Labeling hostPath storage for SELinux

If you are using hostPath storage with Security Enhanced Linux® (SELinux) in enforcing mode, you must label the storage path on all nodes where your IBM Cloud Pak for Data database service runs.

Attention: Starting with IBM Cloud Pak for Data 4.6.0, support for hostPath is deprecated and will be discontinued in a future release.

Run the following commands to apply the container_file_t SELinux label to the storage path on all nodes. For dedicated deployments, run the commands on all labeled nodes. For non-dedicated deployments, run them on all worker nodes.

# chmod 777 storage_path
# semanage fcontext -a -t container_file_t "storage_path(/.*)?"
# restorecon -Rv storage_path

Replace storage_path with the path to your persistent volume.