34.2 Changing the Location of the Content Repository on a Linux or Appliance Server

From ZENworks 2020 Update 2 onwards, ZENworks might not function properly if you have content-repo as a symbolic link to a folder that is outside the ZENworks folder structure.

For example, if the content is available in /var/my-external-content-repo and /var/opt/microfocus/zenworks/content-repo points to that location, then it might not work.

Hence, ensure that you move the /var/my-external-content-repo to a different partition and mount it to /var/opt/microfocus/zenworks/content-repo.

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.

Let us assume that /dev/sdb is a partition on which you are planning have the content-repo, perform the following steps:

  1. Stop all the ZENworks services.

  2. Create a directory by running mkdir /tmp/temp-mount

  3. Mount the partition: mount </dev/sdb> /tmp/temp-mount

  4. Move the content by using mv /var/my-external-content-repo/* /tmp/temp-mount

  5. Unmount the directory by using umount /tmp/temp-mount

  6. Remove the directory by running rmdir /tmp/temp-mount

  7. Remove the symbolic link by running rm /var/opt/novell/zenworks/content-repo/.

  8. Create a directory by running the mkdir /var/opt/novell/zenworks/content-repo/ command.

  9. Run mount </dev/sdb> /var/opt/microfocus/zenworks/content-repo to mount the content-repo. Ensure that this steps is performed automatically by adding an entry in the /etc/fstab file.

    Example: //localhost/zenshare /var/opt/microfocus/zenworks/content-repo cifs username=root,password=rootpass 0 0

  10. To verify, run ls /var/opt/microfocus/zenworks/content-repo

    If the command lists the content and images folder, then the content-repo is configured successfully.

  11. Run permissions.sh

  12. Start all the ZENworks services.

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

34.2.1 Mounting a Share

After configuring a share on a remote machine, you can mount it from /var/opt/microfocus/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/microfocus/zenworks/content-repo

In the command, //example.machine.com/share-name is the share to mount and /var/opt/microfocus/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/microfocus/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/microfocus/zenworks/content-repo/content

Start all ZENworks Services after the share is mounted.

34.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/microfocus/zenworks/content-repo

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

34.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/microfocus/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:


34.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.