28.2 Changing the Location of the Content Repository on a Linux Server

You can store your data on a local mount or on a network share such as NFS, SMB, or CIFS and mount the share in your content-repo directory to access your data.

You can also create a symbolic link on your local hard drive if you want to store your data elsewhere on your local device. However, the existing content-repo directory must be deleted.

  1. (Optional) Run the following command to move the content from the content-repo directory to a new directory on the disk to which you want to create the symbolic link:

    mv /var/opt/novell/zenworks/content-repo/* another-local-directory-on-device

  2. Run the following command to delete the content-repo directory:

    rm -rf /var/opt/novell/zenworks/content-repo/

  3. Run the following command to create the symbolic link to the new directory where you want to store the data:

    ln -s another-local-directory-on-device /var/opt/novell/zenworks/content-repo

    See the ln(1) man page for more information about how to symbolically link directories.

    NOTE:You do not need to perform Step 4 if you are trying to configure the content repository on a Linux Satellite Server.

  4. ZENworks requires that the ZENworks user has complete ownership rights on the directory to which you have created the symbolic link. Run the following command to make the ZENworks user the owner of this directory:

    chown zenworks:zenworks -R /var/opt/novell/zenworks/content-repo/

    See the chown(1) man page for more information about how to change ownership of directories.

The following sections provide information on managing content repository locations on Linux.

28.2.1 Mounting a Share

After configuring a share on a remote machine, you can mount it from /var/opt/novell/zenworks/content-repo. Stop all ZENworks Services before mounting the share.

Use the following command to mount the share:

mount -t cifs -o username=username //example.machine.com/share_name /var/opt/novell/zenworks/content-repo

In the command, //example.machine.com/share-name is the share to mount and /var/opt/novell/zenworks/content-repo is the mount point.

If you only need to store the data from part of your content repository on another share, you can also do that. For example, if you need to store your ZENworks image files on another share, you can use the following command:

mount -t cifs -o username=username //example.machine.com/share_name /var/opt/novell/zenworks/content-repo/images

Or, to store bundle and policy content on another share, you can use the following command:

mount -t cifs -o username=username //example.machine.com/share_name /var/opt/novell/zenworks/content-repo/content

Start all ZENworks Services after the share is mounted.

28.2.2 Unmounting a Share

The mount that you created in Mounting a Share is temporary; the share is unmounted when the operating system is shut down or rebooted. You can also use the following command to manually unmount the share:

umount /var/opt/novell/zenworks/content-repo

Stop all ZENworks Services before unmounting the share and start all ZENworks Service after the share is unmounted.

28.2.3 Creating a Permanent Mount

Stop all ZENworks Services before creating a permanent mount and start all ZENworks Service after the permanent mount is created.

To ensure that the mount occurs each time the Linux server starts, you must add the following entry to your /etc/fstab configuration file:

//example.machine.com/share_name /var/opt/novell/zenworks/content-repo cifs credentials=path_to_credentials_file 0 0

The credentials file listed in the command contains a username and password. For more information, see the mount.cifs(8) man page. The format of the credentials file is:

username=value
password=value

28.2.4 Moving Existing Content to the New Repository

After you change the location of a content repository by mounting a new share, any content in the old location is no longer available. To make it available, you must move it to the new repository. Stop all ZENworks Services before moving existing content to the new repository and start all ZENworks Service after the existing content is moved.