1. 环境描述
NFS server和NFS client操作系统版本:
bidw2:~ # cat /etc/SuSE-release
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 1
bidw2:~ # uname -a
Linux bidw2 2.6.32.59-0.7-default #1 SMP 2012-07-13 15:50:56 +0200 x86_64 x86_64 x86_64 GNU/Linux
blog地址:http://blog.youkuaiyun.com/hw_libo/article/details/39521849
2. NFS client挂载时出现错误
bidw2:~ # mount -t nfs -o rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,vers=3,timeo=600,actimeo=0 192.168.142.60:/filedir /filedir
mount.nfs: access denied by server while mounting 192.168.142.60:/filedir
经确认过,防火墙都是关闭的,网络是正常的:
bidw2:~ # showmount -e 192.168.142.60
Export list for 192.168.142.60:
/filedir 192.168.142.*
Sep 24 12:57:37 bidw1 mountd[17400]: refused unmount request from 192.168.142.61 for /filedir (/filedir): unmatched host
Sep 24 12:57:55 bidw1 mountd[17400]: refused mount request from 192.168.142.61 for /filedir (/filedir): unmatched host
NFS server的/etc/exports配置如下:
bidw1:~ # cat /etc/exports
/filedir 192.168.142.*(rw,no_root_squash,sync)
这种配置,我在SuSE 10 sp1/sp2的系统中都做过配置,NFS都是可以正常使用的,也可以正常挂载,为什么到了SuSE 11后就不行了呢?
3. 解决办法
根据以往碰到这类问题的经验,我将NFS server的配置调整为:
bidw1:~ # cat /etc/exports
/filedir 192.168.142.0/24(rw,no_root_squash,sync)
然后重启了下NFS server:
bidw1:~ # rcnfsserver restart
再次在NFS client中进行挂载NFS时,发现挂载成功了:
bidw2:~ # mount -t nfs -o rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,vers=3,timeo=600,actimeo=0 192.168.142.60:/filedir /filedir
bidw2:~ # df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 127G 43G 78G 36% /
devtmpfs 109G 5.0M 109G 1% /dev
tmpfs 64G 26G 38G 42% /dev/shm
/dev/sda3 30G 309M 28G 2% /home
/dev/sda2 50G 498M 47G 2% /opt
/dev/sda6 50G 18G 30G 37% /opt/oracle
192.168.142.60:/filedir
1.5T 316G 1.1T 23% /filedir
总结:
或许在SuSE 11系统中,已经不能使用通匹符*做匹配了,只能做精确匹配,或时使用192.168.142.0/24做网段匹配。
blog地址:http://blog.youkuaiyun.com/hw_libo/article/details/39521849
-- Bosco QQ:375612082
---- END ----
-------------------------------------------------------------------------------------------------------
版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!