Why can't my app access or write to PVCs?
Classic infrastructure
When you mount a PVC to your pod, you might experience errors when accessing or writing to the PVC.
- List the pods in your cluster and review the status of the pod.
oc get pods
- Find the root cause for why your app can't access or write to the PVC.
oc describe pod <pod_name>
oc logs <pod_name>
- Review common errors that can occur when you mount a PVC to a pod.
Symptom or error message | Description | Steps to resolve |
---|---|---|
Your pod is stuck in a ContainerCreating state. MountVolume.SetUp failed for volume ... read-only file system . |
The IBM Cloud infrastructure back end experienced network problems. To protect your data and to avoid data corruption, IBM Cloud automatically disconnected the file storage server to prevent write operations on NFS file shares. | See File storage: File systems for worker nodes change to read-only |
write-permission don't have required permission can't create directory '/bitnami/mariadb/data': Permission denied |
In your deployment, you specified a non-root user to own the NFS file storage mount path. By default, non-root users don't have write permission on the volume mount path for NFS-backed storage. | See File storage: App fails when a non-root user owns the NFS file storage mount path |
After you specified a non-root user to own the NFS file storage mount path or deployed a Helm chart with a non-root user ID specified, the user can't write to the mounted storage. | The deployment or Helm chart configuration specifies the security context for the pod's fsGroup (group ID) and runAsUser (user ID) |
See File storage: Adding non-root user access to persistent storage fails |