linux挂载nfs报错,Linux NFS挂载报错wrong fs type, bad option, bad superblock

在RHEL6.8系统中尝试挂载NFS时出现错误:`wrong fs type, bad option, bad superblock`。通过安装`nfs-utils`和启动`rpcbind`服务来解决问题。安装`nfs-utils`后,如果遇到`rpc.statd is not running`的警告,需要启动`rpcbind`服务并设置开机启动,然后挂载成功。" 116920899,10546101,Linux下gzip、pigz与GTX压缩工具对比分析,"['Linux压缩', '生物信息学', '测序数据分析', '软件工具', '数据存储']

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.故障现象

我的测试环境有一个NAS,之前配置都是按照测试需求在/etc/fstab里添加配置挂载选项:

vi /etc/fstab

192.168.1.2:/mnt/HD/HD_a2/Public /public nfs rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,actimeo=0,vers=3,timeo=600

创建/public目录后,直接mount挂载即可:

mkdir /public

mount -a

但今天在一套最小化安装的RHEL6.8上,挂载时遇到报错如下:

[root@test04 ~]# mount -a

mount: wrong fs type, bad option, bad superblock on 192.168.1.2:/mnt/HD/HD_a2/Public,

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

2.解决方案

解决方法是安装nfs-utils:

[root@test04 ~]# yum install nfs-utils

再次尝试挂载报错:

[root@test04 ~]# mount -a

mount.nfs: rpc.statd is not running but is required for remote locking.

mount.nfs: Either use '-o nolock' to keep locks local, or start statd.

mount.nfs: an incorrect mount option was specified

这个报错比较明显了,需检查下rpc.statd对应的rpcbind服务状态,启动这个服务并确保其之后开机自启动:

[root@test04 ~]# service rpcbind status

rpcbind is stopped

[root@test04 ~]# service rpcbind start

Starting rpcbind: [ OK ]

[root@test04 ~]# chkconfig --list rpcbind

rpcbind 0:off 1:off 2:on 3:on 4:on 5:on 6:off

再次尝试挂载成功:

[root@test04 ~]# mount -a

[root@test04 ~]# df -h

Filesystem Size Used Avail Use% Mounted on

/dev/mapper/vg_test04-lv_root

18G 829M 16G 5% /

tmpfs 939M 0 939M 0% /dev/shm

/dev/sda1 477M 39M 414M 9% /boot

192.168.1.2:/mnt/HD/HD_a2/Public

2.7T 1.6T 1.2T 57% /public

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值