Appendix A. Using an NFS Share for Content Storage
Your environment requires adequate hard disk space to fulfill content storage. In some situations, it is useful to use an NFS share to store this content. This appendix shows how to mount the NFS share on your Satellite Server’s content management component.
Do not mount the full
/var/lib/pulp on an NFS share. Parts of the Satellite Server use transient SQLite databases, which have issues over NFS. Red Hat recommends the use of high-bandwidth, low-latency storage for the
/var/lib/pulp file system. Red Hat Satellite has many operations that are IO-intensive so usage of high-latency, low-bandwidth storage could potentially have issues with performance degradation. Only use the NFS share for the
Create the NFS share. This example uses a share at
nfs.example.com:/satellite/content. Make sure this share provides the appropriate permissions to the Satellite Server and its
Shutdown the Satellite services on the Satellite host:
# katello-service stop
Make sure the Satellite Server has the
# yum install nfs-utils
You need to copy the existing contents of
/var/lib/pulp/contentto the NFS share. First, mount the NFS share to a temporary location:
# mkdir /mnt/temp # mount -o rw nfs.example.com:/satellite/content /mnt/temp
Copy the existing contents of
/var/lib/pulp/contentto the temporary location:
# cp -r /var/lib/pulp/content/* /mnt/temp/.
Set the permissions for all files on the share to use the
apacheuser. This ID of this user is usually 48.
Unmount the temporary storage location:
# umount /mnt/temp
Remove the existing contents of
# rm -rf /var/lib/pulp/content/*
/etc/fstabfile and add the following line:
nfs.example.com:/satellite/content /var/lib/pulp/content nfs rw,hard,intr,context="system_u:object_r:httpd_sys_rw_content_t:s0"
This makes the mount persistent across system reboots. Make sure to include the SELinux context.
Enable the mount:
# mount -a
Confirm the NFS share mounts to
# df Filesystem 1K-blocks Used Available Use% Mounted on ... nfs.example.com:/satellite/content 309506048 58632800 235128224 20% /var/lib/pulp/content ...
Also confirm that the existing content exists at the mount on
# ls /var/lib/pulp/content
Start the Satellite services on the Satellite host:
# katello-service start
The Satellite Server now uses the NFS share to store content. Run a content synchronization (see Section 4.3, “Synchronizing Content”) to make sure the NFS share works as expected.