nfs挂载报错误wrong fs type, bad option, bad superblock

今天在kubernetes集群上搭建wordpress时,利用pv nfs存储方式持久化,但是pod一直不能Running,kubectl describe pod {wordpress pod name}报错如下:

mount: wrong fs type, bad option, bad superblock on 125.64.41.244:/data/img,
       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

我的wordpress服务部署到kubernetes集群,主机是腾讯云,nfs部署到阿里云,在网上搜索了一下说是没有安装 mount.nfs导致,也是说需要在我的腾讯云主机上安装mount.nfs就不会有wrong fs type, bad option, bad superblock错误提示了。

根据错误提示,查看/sbin/mount.文件,果然发现没有/sbin/mount.nfs的文件,安装nfs-utils即可。

解决方法

ubuntu上执行以下命令:

apt-get install nfs-common

centos上执行:

yum install nfs-utils -y

安装之后,/sbin/下面多了两个mount文件,分别是mount.nfsmount.nfs4

代码如下 复制代码

[root@master ~]# ll /sbin/mount*
-rwsr-xr-x 1 root root 117432 Aug  9 09:17 /sbin/mount.nfs
lrwxrwxrwx 1 root root      9 Jan  6 17:43 /sbin/mount.nfs4 -> mount.nfs
-rwxr-xr-x 1 root root  41563 Aug  9 09:16 /sbin/mountstats

作者简洁

作者:小碗汤,一位热爱、认真写作的小伙,目前维护原创公众号:『我的小碗汤』,专注于写go语言、docker、kubernetes、java等开发、运维知识等提升硬实力的文章,期待你的关注。转载说明:务必注明来源(注明:来源于公众号:我的小碗汤,作者:小碗汤)

你可能感兴趣的:(nfs挂载报错误wrong fs type, bad option, bad superblock)