Application Delivery Management
Application Modernization & Connectivity
CyberRes
IT Operations Management
Contents:
A ZENworks Linux Management server can be installed on the supported Server platform with EXT3 file system. The package repositories for the ZENworks Linux Management server can be hosted either on a local device or a remote device that has the EXT3 file system.
In ZENworks Linux Management, the path to the package repository on the Primary Server and the Secondary Servers is /var/opt/novell/zenworks/pkg-repo/ . The rpm packages imported as content of any package bundle are stored in the packages directory under the package-repository path on the ZENworks Server. The package directory organizes the packages based on the hexadecimal 4 char directory names such as '30d1'. These directories contain zero or more rpm packages which are imported from any package bundle. This package repository on the ZENworks Primary Server is also replicated to all the ZENworks Secondary Servers during the content replication action.
The EXT3 file system can have only 32000 subdirectories under a given directory. Therefore, on a ZENworks Linux Management server installed on an EXT3 file system, the package management backend cannot create more than 32000 subdirectories under the /var/opt/novell/zenworks/pkg-repo/packages directory, for storing the packages that are imported through the package bundles.
The solution explained in this document is applicable for the ZENworks 7.2 Linux Management and the ZENworks 7.3 Linux Management servers.
Note: This solution might not be required for package repositories on other file systems such as Reiserfs and XFS. This is because these file systems do not have a limitation of 32000 subdirectories. However, you can still perform the package repository cleaning process to free the disk space on ZENworks Server.
You can overcome the limitation of the EXT3 file system by doing any of the following:
Cleaning the package repository is only a temporary solution to overcome the directories limitation of the EXT3 file system. This depends on the number of bundle versions and packages that are associated to bundles or are dangling in the repository.
By cleaning the Package Repository, you can reduce the risk of reaching the 32000 limitation for package directories on the ZENworks Server. The directories that are created within the /var/opt/novell/zenworks/pkg-repo/packages directory on the ZLM Server are also reduced. You can, therefore, import more packages into the package repository through bundles.
To clean the local package repository, it is recommended to do the following:
On deleting the package bundles, the packages are orphaned in the package repository if they are not associated with any other bundles. After removing the bundles or bundle versions, you can clean up the Orphan RPM packages from the ZLM Server's package repository by using either the ZCC or zlman commands.
Empty directories are created within the /var/opt/novell/zenworks/pkg-repo/packages/ directory. To clean up these empty directories on the ZENworks Primary Server that has the local package repository, run the following shell script on the ZLM Server:
>>>>>>>>>>>>Package -Empty-Directories - Cleanup-Script>>>>>>>>>>>>
cd /var/opt/novell/zenworks/pkg-repo/packages/
logfile="/var/opt/novell/log/zenworks/pkg-repo-cleanup.log"
echo "-----------------------------------------------" > $logfile
echo -n "Total packages repository directories count at `date` is : " >> $logfile
find -depth -type d -exec ls -ld {} \; | wc -l >> $logfile
#list all empty directories
echo "Logging the packages empty directories under the path : `pwd`"
echo -n "Total empty directories found under packages are : " >> $logfile
find -depth -type d -empty -exec ls -ld {} \; | wc -l >> $logfile
find -depth -type d -empty -exec echo {} \; >> $logfile
#delete empty directory under packages
echo "Deleting the packages empty directories under the path : `pwd` "
/usr/bin/perl -MFile::Find -e"finddepth(sub{rmdir},'.')"
#alternative way to delete empty directories
#find -depth -type d -empty -exec rmdir {} \
echo -n "Total packages directories count after deleting is : " >> $logfile
find -depth -type d -exec ls -ld {} \; | wc -l >> $logfile
The /var/opt/novell/log/zenworks/pkg-repo-cleanup.log file that is created lists the package directories available before and after cleaning the package repository.
You can configure a non EXT3 file system as a ZENworks Package Repository by adding an additional disk or a new volume, and then migrate the package repository data from the EXT3 file system to the new file system. The new file system can be a Reiserfs or XFS file system.
To configure and migrate the package repository data:
You can choose the disaster recovery process to promote a Secondary Server to a Primary Server only if no Secondary Servers with the EXT3 file system exist in the Management Zone.
Do the following: