Fixing the Timed out waiting for the condition error when mounting a volume with a large number of files
Written by
Updated at December 17, 2025
Issue description
When launching a pod, you see this error:
Warning FailedMount 49s kubelet Unable to attach or mount volumes: unmounted volumes=[jenkins-home], unattached volumes jenkins-home jenkins config kube-api-access-2ldxk sc-config-volume admin-secret jenkins-additional-secrets jenkins-cache tmp-volume[]: timed out waiting for the condition
Diagnostics and issue reproduction
Analyze the system logs:
journalctl -t kernel --no-pager --since "today"
journalctl --system --no-pager --since "today"
journalctl -u kubelet --no-pager --since "today"
When launching the pod in question, the kubelet system service logs contain the following message:
If the volume has a lot of files then setting volume ownership could be slow...
Solution
A volume takes a while to mount because of the large number of files in the target file system. By default, the fsgroup configuration is recursively set at each volume mount. You can find the error details on its discussion page in the Kubernetes Git repository
We recommend setting up the security context for the pod using this guide