Unable to attach or mount volumes timed out waiting for the condition

6/21/2021

After the pods has been restarted (evicted) that messages appears in pod describe for at least 1.5h and than pod state is changed to running without any intervention.

It's happening on GKE cluster vers: 1.17.17-gke.9100

Warning  FailedMount  53m (x3 over 96m)    kubelet  Unable to attach or mount volumes: unmounted volumes=[data-4 data-1 data-2 data-3], unattached volumes=[data-4 default-token-m4wjf data-1 data-2 data-3]: timed out waiting for the condition
Warning  FailedMount  51m (x7 over 87m)    kubelet  Unable to attach or mount volumes: unmounted volumes=[data-1 data-2 data-3 data-4], unattached volumes=[default-token-m4wjf data-1 data-2 data-3 data-4]: timed out waiting for the condition
Warning  FailedMount  40m (x4 over 103m)   kubelet  Unable to attach or mount volumes: unmounted volumes=[data-3 data-4 data-1 data-2], unattached volumes=[data-3 data-4 default-token-m4wjf data-1 data-2]: timed out waiting for the condition
Warning  FailedMount  33m (x5 over 108m)   kubelet  Unable to attach or mount volumes: unmounted volumes=[data-2 data-3 data-4 data-1], unattached volumes=[data-2 data-3 data-4 default-token-m4wjf data-1]: timed out waiting for the condition
Warning  FailedMount  30m (x16 over 105m)  kubelet  Unable to attach or mount volumes: unmounted volumes=[data-1 data-2 data-3 data-4], unattached volumes=[data-1 data-2 data-3 data-4 default-token-m4wjf]: timed out waiting for the condition
Warning  FailedMount  28m                  kubelet  Unable to attach or mount volumes: unmounted volumes=[data-2 data-4 data-1], unattached volumes=[data-2 data-3 data-4 default-token-m4wjf data-1]: timed out waiting for the condition
Warning  FailedMount  26m                  kubelet  Unable to attach or mount volumes: unmounted volumes=[data-4 data-1 data-2], unattached volumes=[data-3 data-4 default-token-m4wjf data-1 data-2]: timed out waiting for the condition
Warning  FailedMount  24m                  kubelet  Unable to attach or mount volumes: unmounted volumes=[data-1 data-2 data-4], unattached volumes=[data-1 data-2 data-3 data-4 default-token-m4wjf]: timed out waiting for the condition
Warning  FailedMount  14m                  kubelet  Unable to attach or mount volumes: unmounted volumes=[data-2 data-1], unattached volumes=[data-2 data-3 data-4 default-token-m4wjf data-1]: timed out waiting for the condition
Warning  FailedMount  10m (x2 over 19m)    kubelet  (combined from similar events): Unable to attach or mount volumes: unmounted volumes=[data-1 data-2], unattached volumes=[data-4 default-token-m4wjf data-1 data-2 data-3]: timed out waiting for the condition
Warning  FailedMount  8m8s (x4 over 21m)   kubelet  Unable to attach or mount volumes: unmounted volumes=[data-1 data-2], unattached volumes=[data-1 data-2 data-3 data-4 default-token-m4wjf]: timed out waiting for the condition
-- Marcin K
google-kubernetes-engine
kubernetes

1 Answer

9/9/2021

Please note that the more information you share, the easier it would be to provide an answer, as mentioned in a comment it would help if you could share more details about your configuration as well as the related event information.

You would need to check how you’re creating the PVC, PV, and Storage Class; and ensure that the configuration is correct, related docs 1.

Note that if the filesystem type for the persistent disk you use doesn't match the fsType you specify in the PersistentVolume manifest, pods you create that consume the volumes will not start, and you will see errors in the Pod description.

You can also check if the access modes are too restrictive a, maybe the PV can only be attached to a single Node. I would recommend reviewing the access modes 3.

-- Toni
Source: StackOverflow