Operating System - Linux
1821539 Members
2745 Online
109633 Solutions
New Discussion юеВ

NFS Error - unbale to mount the share

 
WW288996
Frequent Advisor

NFS Error - unbale to mount the share

Hi,

I have a NFS server(10.50.131.162) and I have shared the following folder and I was able to mount the same share to another machine(10.50.131.162) and it is working fine.

/opt/mpp/packages 10.58.131.100(rw,sync,no_root_squash)

I have shared one more folder which is mentoned below to the same machine but I am not able to mount the same to clien machie.

/tbstorage 10.58.131.100(rw,sync,no_root_squash)

While mounting the new nfs share at client machine side I am getting the following error,

[root@delhi T2]# mount -t nfs 10.58.131.162:/tbstorage /tbstorage
mount: 10.58.131.162:/tbstorage failed, reason given by server: Permission denied


After putting new folder in /etc/exports I have excuted the following commands also,

[root@blrmpp01 T2]# /etc/init.d/nfs reload
[root@blrmpp01 T2]# exportfs -ra


I am using RHEL5 NFS Server and RHEL4 as NFS client.

Please help me in this regard.

Please find the NFS server status below,

[root@blrmpp01 ~]# rpcinfo -p
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 1003 status
100024 1 tcp 1006 status
100021 1 udp 37319 nlockmgr
100021 3 udp 37319 nlockmgr
100021 4 udp 37319 nlockmgr
100021 1 tcp 40620 nlockmgr
100021 3 tcp 40620 nlockmgr
100021 4 tcp 40620 nlockmgr
100011 1 udp 866 rquotad
100011 2 udp 866 rquotad
100011 1 tcp 869 rquotad
100011 2 tcp 869 rquotad
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100005 1 udp 935 mountd
100005 1 tcp 938 mountd
100005 2 udp 935 mountd
100005 2 tcp 938 mountd
100005 3 udp 935 mountd
100005 3 tcp 938 mountd


[root@blrmpp01 ~]# /etc/init.d/nfs status
rpc.mountd (pid 17295) is running...
nfsd (pid 17292 17291 17290 17289 17288 17287 17286 17285) is running...
rpc.rquotad (pid 17225) is running...
[root@blrmpp01 ~]# /etc/init.d/portmap status
portmap (pid 4559) is running...
[root@blrmpp01 ~]# /etc/init.d/iptables status
Firewall is stopped.


Please find the NFS client status below,

[root@delhi ~]# /etc/init.d/netfs status
Active NFS mountpoints:
/mppreplication
[root@delhi ~]# /etc/init.d/nfs status
rpc.mountd is stopped
nfsd is stopped
rpc.rquotad is stopped
[root@delhi ~]# /etc/init.d/portmap status
portmap (pid 23209) is running...
[root@delhi ~]# /etc/init.d/iptables status
Firewall is stopped.
[root@delhi ~]# rpcinfo -p
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100007 2 udp 942 ypbind
100007 1 udp 942 ypbind
100007 2 tcp 945 ypbind
100007 1 tcp 945 ypbind




11 REPLIES 11
WW288996
Frequent Advisor

Re: NFS Error - unbale to mount the share

Please find the client side existing mount

[root@delhi ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/cciss/c0d0p3 267G 240G 14G 95% /
/dev/cciss/c0d0p1 1012M 40M 921M 5% /boot
10.58.131.162:/opt/mpp/packages
291G 148G 129G 54% /mppreplication


[root@delhi ~]# showmount -e 10.58.131.162
Export list for 10.58.131.162:
/tbstorage 10.58.131.100
/opt/mpp/local_packages 10.58.131.100

But If I try the following i am getting permission denied message

[root@delhi ~]# mount -t nfs 10.58.131.162:/tbstorage /tbstorage
mount: 10.58.131.162:/tbstorage failed, reason given by server: Permission denied

Durvesh Mendhekar
Regular Advisor

Re: NFS Error - unbale to mount the share

Hi,

Have you checked the /var/log/messages
for errors.

If nothing is working we will look your problem form basics.
Give a try by restarting the below serives
1)NFS
2)portmap
3)also check the file permission

Check
#netstat -nltup
see if NFS and portmap is working properly

looking at ur given out put you have done exporting Ok. but just export it in (ro) mode first.

if every thing done with exporting
check if you can mount this locally as NFS to another folder
with
#mount -t nfs source dest
if this works fine your almost done.
let me know once its success...

Durvesh
WW288996
Frequent Advisor

Re: NFS Error - unbale to mount the share

/var/log/messages on NFS server:
-----------------------------------

Jan 27 10:08:07 localhost mountd[17295]: authenticated mount request from 10.58.131.100:785 for /tbstorage (/tbstorage)
Jan 27 10:08:12 localhost mountd[17295]: authenticated mount request from 10.58.131.100:786 for /tbstorage (/tbstorage)
Jan 27 10:08:19 localhost mountd[17295]: authenticated mount request from 10.58.131.100:787 for /tbstorage (/tbstorage)
Jan 27 10:20:21 localhost mountd[17295]: authenticated mount request from 10.58.131.100:827 for /tbstorage (/tbstorage)
Jan 27 10:20:33 localhost mountd[17295]: authenticated mount request from 10.58.131.100:828 for /tbstorage (/tbstorage)
Jan 27 12:03:42 localhost mountd[17295]: authenticated mount request from 10.58.131.100:628 for /tbstorage (/tbstorage)
Jan 27 13:43:34 localhost mountd[17295]: authenticated mount request from 10.58.131.100:661 for /tbstorage (/tbstorage)
Vitaly Karasik_1
Honored Contributor

Re: NFS Error - unbale to mount the share

are you still able to mount your "packages" directory?
WW288996
Frequent Advisor

Re: NFS Error - unbale to mount the share

/opt/mpp/packages is already mounted and used by people, that is working fine.
WW288996
Frequent Advisor

Re: NFS Error - unbale to mount the share

Executed the below commands also, but still not working, I doubt if I restart nfs service on nfs server the existing mount also will work or not ?


On NFS Server(10.58.131.162)
---------------------------------
[root@blrmpp01 ~]# ls -ld /tbstorage
drwxr-xr-x 4 root root 4096 Jan 25 13:08 /tbstorage
[root@blrmpp01 ~]# chmod 777 /tbstorage
[root@blrmpp01 ~]# ls -ld /tbstorage
drwxrwxrwx 4 root root 4096 Jan 25 13:08 /tbstorage
[root@blrmpp01 ~]# /etc/init.d/nfs reload
[root@blrmpp01 ~]# exportfs -ra
[root@blrmpp01 ~]# cat /etc/exports
/opt/mpp/packages 10.58.131.100(rw,sync,no_root_squash)
/tbstorage 10.58.131.100(rw,sync,no_root_squash)

On NFS Client (10.58.131.100)
--------------------------------
[root@delhi ~]# /etc/init.d/nfs reload
[root@delhi ~]# /etc/init.d/netfs reload
Mounting other filesystems: [ OK ]
[root@delhi ~]# mount -t nfs 10.58.131.162:/tbstorage /tbstorage
mount: 10.58.131.162:/tbstorage failed, reason given by server: Permission denied

[root@delhi ~]# showmount -e 10.58.131.162
Export list for 10.58.131.162:
/tbstorage 10.58.131.100
/opt/mpp/local_packages 10.58.131.100
[root@delhi ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/cciss/c0d0p3 267G 240G 13G 95% /
/dev/cciss/c0d0p1 1012M 40M 921M 5% /boot
none 2.0G 0 2.0G 0% /dev/shm
10.58.131.162:/opt/mpp/packages
291G 161G 115G 59% /mppreplication
Vitaly Karasik_1
Honored Contributor

Re: NFS Error - unbale to mount the share

Unix permissions don't seem me relevant here - client system should be able to *mount* share anyway, it just won't be able to use files in case of too restrictive permission.

I suspect some typo in your exports config file.
Can you post your /etc/exports?

May be "showmount" will provide some useful info...
Durvesh Mendhekar
Regular Advisor

Re: NFS Error - unbale to mount the share

To make the exports configurations compatible for all version, one needs to export (read only) the root filesystem with an fsid=0. The fsid=0 signals the NFS server that this export is the root.

/ *(ro,fsid=0) /home *(rw,sync,nohide)

Now with these exports, both "mount server:/home /mnt/home" and "mount -t nfs server:/home /mnt/home" will work as expected.

Give a try and let me know.

Durvesh
WW288996
Frequent Advisor

Re: NFS Error - unbale to mount the share

[root@blrmpp01 ~]# cat /etc/exports
/opt/mpp/packages 10.58.131.100(rw,sync,no_root_squash)
/tbstorage 10.58.131.100(rw,sync,no_root_squash)


[root@delhi ~]# showmount -e 10.58.131.162
Export list for 10.58.131.162:
/tbstorage 10.58.131.100
/opt/mpp/local_packages 10.58.131.100
Vitaly Karasik_1
Honored Contributor

Re: NFS Error - unbale to mount the share

what a shame - I was wrong!!!!
yes, Durvesh Mendhekar is right - I encountered similar problem few years ago and fixed it using "fsid=0"

this is NFS4 catch, see for details this article, for example

http://www.novell.com/coolsolutions/feature/17581.html
WW288996
Frequent Advisor

Re: NFS Error - unbale to mount the share

Can you please help me to edit my /etc/exports file,

I cannot change the first line,

/opt/mpp/packages 10.58.131.100(rw,sync,no_root_squash)

because it is already mounted and used in production.

Please help me to change the /etc/exports file with out affecting the first existing mount.
My current /etc/exports file is mentioned below,
[root@blrmpp01 ~]# cat /etc/exports
/opt/mpp/packages 10.58.131.100(rw,sync,no_root_squash)
/tbstorage 10.58.131.100(rw,sync,no_root_squash)