13.1 Content Repository

Each ZENworks Server contains a content repository. The content repository stores all bundle, policy, patch management and system update content that has been replicated to the server and any images that have been captured and stored to the server.

ZENworks 11 supports any filesystem to host the content repository, although each filesystem has advantages and limitations. For example, the XFS filesystem handles very large files, which can be an advantage, depending on the nature of the content in the repository.

A single content repository cannot be shared by multiple Primary Servers. Each server must use its own content repository.

The content repository is self-maintaining. Whenever you add a bundle or policy, the bundle or policy content is added to the appropriate content repositories based upon the replication settings. Whenever you remove a bundle or policy or change which servers host its content, the bundle or policy content is also removed from the appropriate servers.

If necessary, you can move the content repository to a different location. The following sections provide instructions:

13.1.1 Changing the Location of the Content Repository on a Windows Server

The content repository is found in the following location on a Windows server:

installation_path\zenworks\work\content-repo

You can specify a different disk drive to be your content repository. In Windows, this is done by “mounting” the drive. Mounting is simply pointing an existing path to a hard drive partition without the use of mapped drive letters.

In the following steps, you mount the default content repository location to a disk drive partition, which becomes the new content repository:

  1. Make sure that the disk drive you want to use is attached to the server and is properly formatted as NTFS.

    This disk drive can be an existing or new one for the machine. The hardware must be recognized by the server. However, do not specify a drive letter if you are adding a new disk drive to the machine. Windows does not allow mounting to a drive letter.

  2. Stop all ZENworks Services.

  3. Because an empty content-repo directory must exist in the default location (installation_path\zenworks\work\content-repo) to be the pointer to the new content repository location, do one of the following to make sure that there is no content in the default location:

    • If you need to save the content that is now in this directory, rename the existing directory and create a new directory named content-repo.

      You can later copy the content from this renamed directory to the new content repository location (see Step 11).

    • If you do not need any of the content in the existing content-repo directory, delete the directory and re-create it.

    • If the content-repo directory is not present in the path given above, create the path and directory.

  4. Click Start, right-click the My Computer icon, then select Manage.

    You can also click Start, then enter compmgmt.msc at the Run command line.

  5. Select Disk Management under the Storage section in the left pane.

    The disk drive you selected in Step 1 should be displayed in the right pane.

  6. (Conditional) If a driver letter is associated with the partition that you want to use as the new content repository location, do the following:

    1. In the Computer Management dialog box, right-click the drive’s partition.

    2. Select Change Drive Letter and Paths.

    3. Select the drive letter.

    4. Click Remove, then select Yes to confirm.

  7. Right-click the partition of the disk drive that you want to use as your content repository, then select Change Driver Letter and Paths.

    This is the disk drive that you will mount to the content-repo directory in Step 9.

  8. Click Add.

    This displays the Add Drive Letter or Path dialog box.

  9. Select Mount in the Following Empty NTFS Folder, browse for and select the default content-repo directory, then click Next.

    The default directory is installation_path\zenworks\work\content-repo.

    This mounts the default path to the hard drive partition that you selected in Step 7.

    If necessary, format the drive as NTFS using the Computer Management feature in Windows.

  10. Click the buttons as necessary to exit and save the configuration change.

  11. (Conditional; see Step 3) Copy the files from the old renamed content-repo directory to the new content-repo directory.

  12. Start all ZENworks Services.

From this point on, all ZENworks 11 data is written directly to the new content repository location on the selected hard drive partition.

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

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.

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.

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

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.

13.1.3 Mounting the Content Repository on a Linux Server to an NSS Volume

You can mount the content-repo directory on a Linux server on to an NSS Volume.

Before you begin, ensure that the following prerequisites are met:

  • The NSS volume is set up and mounted in the /media/nss/NSSVOL/ directory of the server.

  • The Samba service is installed and configured to run as root on the server. To verify this, run the following command and ensure that the value in UID column is root, especially for the processes with PPID = 1.

    ps -Alf | grep samba

To mount the content-repo directory:

  1. Go to the /etc/init.d/ directory and stop the novell-zenserver, novell-zenloader, and novell-zenmntr services.

  2. Run the following command to move the content from the content-repo directory to a temporary directory on the disk so that the content-repo directory is empty:

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

  3. Go to the /media/nss/NSSVOL directory, and create a zencontent subdirectory within it.

  4. Use YaST to add the newly created subdirectory to the list of Samba shares (for example, zenshare) on the server.

  5. Restart the Samba service.

  6. (Conditional) Run the following command to add a Samba root user if the Samba root user does not already exist:

    smbpasswd -a root

    For security reasons, you must specify a root password that is different from the login password.

  7. (Optional) To test if the newly created share is accessible over the Samba protocol, access the share from a Windows device by providing the Samba root user credentials

  8. Run the following command to mount the zenshare share:

    mount //localhost/zenshare /var/opt/novell/zenworks/content-repo -t cifs -o username=root

  9. Restore the backed-up content to the /var/opt/novell/zenworks/content-repo directory. The content is now stored on the NSS volume.

  10. Go to the /etc/init.d/ directory and restart the novell-zenserver, novell-zenloader, and novell-zenmntr services.

  11. (Conditional) To ensure that the share is automatically mounted every time the server reboots, add the following line in the /etc/fstab file:

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

13.1.4 Changing the Location of the Temporary Location on a Windows Server

Creating bundles that contain content temporarily requires up to twice the amount of disk space as the original files. The bundle creation process uploads copies of the original files from the local machine to a temporary directory on the ZENworks content server. The process then packages those files as encrypted, compressed ZENworks content files. After the ZENworks content files are created, the original uploaded files are automatically deleted.

When the bundle is created in ZENworks Control Center, the temporary files are stored in the installation_path\zenworks_home\share\tomcat\temp location.

If the space on the default temporary location is insufficient, you can specify a different disk drive to be the location of temporary files.In Windows, this is done by “mounting” the drive. Mounting is simply pointing an existing path to a hard drive partition without the use of mapped drive letters.

In the following steps, you mount the default temporary location to a disk drive partition, which becomes the new temporary location:

  1. Make sure that the disk drive you want to use is attached to the server and is properly formatted as NTFS.

    This disk drive can be an existing or new one for the machine. The hardware must be recognized by the server. However, do not specify a drive letter if you are adding a new disk drive to the machine. Windows does not allow mounting to a drive letter.

  2. Stop all ZENworks Services.

  3. Click Start, right-click the My Computer icon, then select Manage.

    You can also click Start, then enter compmgmt.msc at the Run command line.

  4. Select Disk Management under the Storage section in the left pane.

    The disk drive you selected in Step 1 should be displayed in the right pane.

  5. (Conditional) If a driver letter is associated with the partition that you want to use as the new content repository location, do the following:

    1. In the Computer Management dialog box, right-click the drive’s partition.

    2. Select Change Drive Letter and Paths.

    3. Select the drive letter.

    4. Click Remove, then select Yes to confirm.

  6. Right-click the partition of the disk drive that you want to use as your temporary location, then select Change Driver Letter and Paths.

    This is the disk drive that you will mount to the temporary location directory in Step 9.

  7. Click Add.

    This displays the Add Drive Letter or Path dialog box.

  8. Select Mount in the Following Empty NTFS Folder, browse for and select the default temporary location directory, then click Next.

    The default directory is installation_path\zenworks_home\share\tomcat\temp.

    This mounts the default path to the hard drive partition that you selected in Step 7.

    If necessary, format the drive as NTFS using the Computer Management feature in Windows.

  9. Click the buttons as necessary to exit and save the configuration change.

  10. Start all ZENworks Services.

From this point on, all ZENworks 11 data is written directly to the new temporary location on the selected hard drive partition.

13.1.5 Changing the Location of the Temporary Location 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 temporary 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 temporary location directory must be deleted.

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

    ln -s another-temporary-directory-on-device /var/temp/

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

  2. 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/temp/

    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.

Mounting a Share

After configuring a share on a remote machine, you can mount it from /var/temp/. 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/temp/

In the command, //example.machine.com/share-name is the share to mount and /var/temp/ is the mount point.

Start all ZENworks Services after the share is mounted.

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/temp/

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

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/temp/ 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