nfs挂载报错误wrong fs type, bad option, bad superblock
程序员文章站
2022-07-15 10:03:34
...
今天在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.nfs
和mount.nfs4
:
代码如下 复制代码
[[email protected] ~]# 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
推荐阅读
-
KVM http网络加载镜像报错(mount: wrong fs type, bad option, bad superblock on /dev/loop0)
-
nfs挂载报错误wrong fs type, bad option, bad superblock
-
RHEL 5.8 挂载cifs协议报错“mount: wrong fs type, bad option, bad superblock”
-
CentOS 7.5 挂载cifs协议报错“mount: wrong fs type, bad option, bad superblock”
-
KVM http网络加载镜像报错(mount: wrong fs type, bad option, bad superblock on /dev/loop0)