Get the App
SLTechnology News&Howtos  ›  Servers  › 

Unable to mount volumes for pod & quot;nginx-

Shulou Source: shulou.com Published: 2022-06-03 03:21:18 10月03日 Update

Events: Type Reason Age From Message

Warning FailedMount 6m (x25 over 1h) kubelet, 10.130.33.13 Unable to mount volumes for pod "nginx-hello-deployment-6f9f4d7bcc-lbt2n_chenqiang-pv-test (7b0fcbd3-7382-11e8-80b5-74eacb7559f1)": timeout expired waiting for volumes to attach/mount for pod "chenqiang-pv-test" / "nginx-hello-deployment-6f9f4d7bcc-lbt2n". List of unattached/unmounted volumes= [nfs]

Warning FailedMount 12s (x39 over 1h) kubelet 10.130.33.13 (combined from similar events): MountVolume.SetUp failed for volume "nfs-pv": mount failed: exit status 32 Mounting command: systemd-run Mounting arguments:-- description=Kubernetes transient mount for / var/lib/kubelet/pods/7b0fcbd3-7382-11e8-80b5-74eacb7559f1/volumes/kubernetes.io~nfs/nfs-pv-- scope-- mount-t nfs 10.130.44.20:/test/mysql-nfs01 / var/lib/kubelet/pods/7b0fcbd3-7382-11e8-80b5-74eacb7559f1/volumes / kubernetes.io~nfs/nfs-pv Output: Running scope as unit run-11918.scope. Mount: wrong fs type, bad option, bad superblock on 10.130.44.20:/test/mysql-nfs01, missing codepage or helper program, or other error (for several filesystems (e.g. Nfs, cifs) you might need a / sbin/mount. Helper program) In some cases useful info is found in syslog-try dmesg | tail or so.

According to the error prompt, check / sbin/mount. File, sure enough, there is no / sbin/mount.nfs file, just install nfs-utils

Solution:

Apt-get install nfs-common

Or

Yum install nfs-utils

After installation, there are several more mount files under / sbin/, such as mount.nfs and mount.nfs4:

[appuser@chenqiang-dev] # cat / sbin/mo

Try kubectl get po again and find out.

Tags: File again method error e.g.prompt Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Huawei macOS MariaDB Xiaomi