自学内容网 自学内容网

mount: wrong fs type, bad option, bad superblock on x.x.x.x:/mnt/nfs-dir

系统环境:CentOS 7。其他发行版命令会有所不同。

挂载 NFS 时报错如下:

[root@localhost /]# mount -t nfs -o nfsvers=4 192.168.1.34:/mnt/nfs-dir /home/test
mount: wrong fs type, bad option, bad superblock on 192.168.1.34:/mnt/nfs-dir,
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.

折腾了一段时间,最后的原因是客户端没有安装相应的 NFS 软件包,系统不支持 NFS 文件系统类型,所以 mount 挂载的时候会失败。

# 安装 NFS 软件包,dnf 方式
dnf install nfs-utils -y

# yum 方式
yum install nfs-utils -y

安装完成后继续执行挂载命令即可。


想要确认系统是否支持 NFS 文件系统类型,可以通过 /proc/filesystems 查看:

cat /proc/filesystems | grep nfs

# 如果支持将打印下面的信息
nodevnfs
nodevnfs4

原文地址:https://blog.csdn.net/peng2hui1314/article/details/142717194

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!