Show Table of Contents
26.4. Configuration Examples
26.4.1. Changing the Default OpenShift Directory
By default, OpenShift stores its data in the
/var/lib/openshift/ directory, which is labeled with the openshift_var_lib_t SELinux type. To allow OpenShift to store data in a different directory, label the new directory with the proper SELinux context.
The following procedure shows how to change the default OpenShift directory for storing data to
/srv/openshift/:
Procedure 26.1. Changing the Default OpenShift Directory for Storing Data
- As root, create a new
openshift/directory within the/srvdirectory. The new directory is labeled with thevar_ttype:~]#mkdir /srv/openshift~]$ls -Zd /srv/openshiftdrwxr-xr-x. root root unconfined_u:object_r:var_t:s0 openshift/ - As root, use the
semanageutility to map/srv/openshift/to the proper SELinux context:~]#semanage fcontext -a -e /var/lib/openshift /srv/openshift - Then, use the
restoreconutility as root to apply the changes:~]#restorecon -R -v /srv/openshift - The
/srv/openshift/directory is now labeled with the correctopenshift_var_lib_ttype:~]$ls -Zd /srv/openshiftdrwxr-xr-x. root root unconfined_u:object_r:openshift_var_lib_t:s0 openshift/

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.