Questo contenuto non è disponibile nella lingua selezionata.
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.
Use high-bandwidth, low-latency storage for the /var/lib/pulp file system. Red Hat Satellite has many I/O-intensive operations; therefore, high-latency, low-bandwidth storage might have issues with performance degradation.
Procedure
-
Create the NFS share. This example uses a share at
nfs.example.com:/Satellite/pulp. Ensure this share provides the appropriate permissions to Satellite Server and itsapacheuser. Stop Satellite services on your Satellite Server:
satellite-maintain service stop
# satellite-maintain service stopCopy to Clipboard Copied! Toggle word wrap Toggle overflow Ensure Satellite Server has the
nfs-utilspackage installed:satellite-maintain packages install nfs-utils
# satellite-maintain packages install nfs-utilsCopy to Clipboard Copied! Toggle word wrap Toggle overflow You need to copy the existing contents of
/var/lib/pulpto the NFS share. First, mount the NFS share to a temporary location:mkdir /mnt/temp mount -o rw nfs.example.com:/Satellite/pulp /mnt/temp
# mkdir /mnt/temp # mount -o rw nfs.example.com:/Satellite/pulp /mnt/tempCopy to Clipboard Copied! Toggle word wrap Toggle overflow Copy the existing contents of
/var/lib/pulpto the temporary location:cp -r /var/lib/pulp/* /mnt/temp/.
# cp -r /var/lib/pulp/* /mnt/temp/.Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Set the permissions for all files on the share to use the
pulpuser. Unmount the temporary storage location:
umount /mnt/temp
# umount /mnt/tempCopy to Clipboard Copied! Toggle word wrap Toggle overflow Remove the existing contents of
/var/lib/pulp:rm -rf /var/lib/pulp/*
# rm -rf /var/lib/pulp/*Copy to Clipboard Copied! Toggle word wrap Toggle overflow Edit the
/etc/fstabfile and add the following line:nfs.example.com:/Satellite/pulp /var/lib/pulp nfs rw,hard,intr,context="system_u:object_r:pulpcore_var_lib_t:s0"
nfs.example.com:/Satellite/pulp /var/lib/pulp nfs rw,hard,intr,context="system_u:object_r:pulpcore_var_lib_t:s0"Copy to Clipboard Copied! Toggle word wrap Toggle overflow This makes the mount persistent across system reboots. Ensure to include the SELinux context.
Enable the mount:
mount -a
# mount -aCopy to Clipboard Copied! Toggle word wrap Toggle overflow Confirm the NFS share mounts to
var/lib/pulp:df
# df Filesystem 1K-blocks Used Available Use% Mounted on ... nfs.example.com:/Satellite/pulp 309506048 58632800 235128224 20% /var/lib/pulp ...Copy to Clipboard Copied! Toggle word wrap Toggle overflow Also confirm that the existing content exists at the mount on
var/lib/pulp:ls /var/lib/pulp
# ls /var/lib/pulpCopy to Clipboard Copied! Toggle word wrap Toggle overflow Start Satellite services on your Satellite Server:
satellite-maintain service start
# satellite-maintain service startCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Satellite Server now uses the NFS share to store content. Run a content synchronization to ensure the NFS share works as expected. For more information, see Section 5.6, “Synchronizing Repositories”.