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.<type> 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.<type>文件,果然发现没有/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
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

进击云原生

众筹一元植发

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值