nfs-utils未安装导致nfs挂载失败

本文记录了在CentOS 7中遇到的NFS挂载失败问题及其解决过程。通过安装nfs-utils软件包成功解决了挂载问题,并验证了挂载的有效性。

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

问题描述

[centos@CentOS7 ~]$ tail -1 /etc/fstab 
192.168.6.31:/nfs /nfs nfs defaults 0 0
[centos@CentOS7 ~]$ sudo mount 192.168.6.31:/nfs /nfs 
mount: wrong fs type, bad option, bad superblock on 192.168.6.31:/nfs,
       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.
[centos@CentOS7 ~]$ sudo /sbin/mount.nfs 192.168.6.31:/nfs /nfs 
sudo: /sbin/mount.nfs: command not found
[centos@CentOS7 ~]$ 

问题解决

[root@CentOS7 ~]# yum install -y nfs-utils >& /dev/null
[root@CentOS7 ~]# 

挂载

[root@CentOS7 ~]# mount /nfs
[root@CentOS7 ~]# df -h /nfs
Filesystem         Size  Used Avail Use% Mounted on
192.168.6.31:/nfs   12G  1.3G   11G  11% /nfs

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

王万林 Ben

你的鼓励将是我创作的最大动力

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

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

打赏作者

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

抵扣说明:

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

余额充值