美文网首页
修复nfs报错bad option

修复nfs报错bad option

作者: 血之君殇 | 来源:发表于2021-03-24 12:28 被阅读0次

    起因

    k8s安装nfs之后,安装应用后部分机器上的pod卡在了镜像创建上,报错如下

     Warning  FailedMount  8m25s (x55 over 10h)   kubelet  Unable to attach or mount volumes: unmounted volumes=[redis-data], unattached volumes=[start-scripts health redis-data config redis-tmp-conf default-token-dlhmb]: timed out waiting for the condition
      Warning  FailedMount  2m11s (x333 over 11h)  kubelet  MountVolume.SetUp failed for volume "pvc-0fc9cd8d-793e-413b-b9d2-51a7da98eecf" : mount failed: exit status 32
    Mounting command: mount
    Mounting arguments: -t nfs 172.18.116.129:/data/k8s/default-redis-data-my-redis-slave-0-pvc-0fc9cd8d-793e-413b-b9d2-51a7da98eecf /var/lib/kubelet/pods/ecec2b7a-affc-4c36-85fa-3877d93ab8a9/volumes/kubernetes.io~nfs/pvc-0fc9cd8d-793e-413b-b9d2-51a7da98eecf
    Output: mount: /var/lib/kubelet/pods/ecec2b7a-affc-4c36-85fa-3877d93ab8a9/volumes/kubernetes.io~nfs/pvc-0fc9cd8d-793e-413b-b9d2-51a7da98eecf: bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program.
    

    解决方案

    在出错的机器上安装nfs-common即可解决

    sudo apt install nfs-common
    

    相关文章

      网友评论

          本文标题:修复nfs报错bad option

          本文链接:https://www.haomeiwen.com/subject/qpachltx.html