Is it safe to symlink pulp cache to /var/lib/pulp for Satellite6 or its Capsule?

Solution Verified - Updated

Environment

Red Hat Satellite 6.9 or older

Issue

  • /var/cache/pulp disk space requirements can be very high (esp. for non-RPM repos)
  • it is beneficial to have the cache on the same logical volume like /var/lib/pulp, to optimise copying files among the directories

Is it therefore supported to have a symbolic link from /var/cache/pulp to /var/lib/pulp/cache?

Resolution

An This content is not included.official request for such recommendation of Satellite deployments was preliminary assessed as safe. So far just one issue has been found: This content is not included.online backup never finishes when using the symlink (fixed in Sat 6.9.5).

The same applies both for Satellite or Capsule.

Particular steps to create such symlink follow. Note it requires to stop all services, which is recommended esp. when no pulp task is in progress (like repo sync or CV publish/promote):

# foreman-maintain service stop

# mkdir /var/lib/pulp/cache

# chmod --reference=/var/cache/pulp /var/lib/pulp/cache

# chown --reference=/var/cache/pulp /var/lib/pulp/cache

# semanage fcontext -a -e /var/cache/pulp /var/lib/pulp/cache

# mv /var/cache/pulp /tmp       ### backup this if any task gets deleted we can need this. later if not we can delete this if not found any issue.

# ln -s /var/lib/pulp/cache /var/cache/pulp

# restorecon /var/lib/pulp/cache /var/cache/pulp

# foreman-maintain service restart

For more KB articles/solutions related to Red Hat Satellite 6.x Pulp 2.0 Issues, please refer to the Consolidated Troubleshooting Article for Red Hat Satellite 6.x Pulp 2.0-related Issues

SBR
Product(s)
Components

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.