1821642 Members
2819 Online
109633 Solutions
New Discussion юеВ

nfs mount does not work

 
Oliver Schmitz
Regular Advisor

nfs mount does not work

Dear all,

I have a question to a misterious behaviour of my maschine: Want to export an FS and mount it from a Linux maschine. Following messages appear:

Entrie in /etc/exports:

/TEST_DATA/msx_box -root=hostname,access=hostname

Reaction:

mount servername:/TEST_DATA/msx_box/ /DATA nfs
mount: servername:/TEST_DATA/msx_box/ failed, reason given by server: Permission denied
mount: nfsmount failed: Bad file descriptor
mount: Mounting servername:/TEST_DATA/msx_box/ on /DATA failed: Invalid argument

Does anybody see a mistake in my commands? What is going wrong else?

Thanks a lot in advance,

Oliver
Oliver Schmitz
13 REPLIES 13
V. Nyga
Honored Contributor

Re: nfs mount does not work

Hi Oliver,

you have made a 'exportfs -a' at the server after changing /etc/exports?

Regards
Volkmar
*** Say 'Thanks' with Kudos ***
Oliver Schmitz
Regular Advisor

Re: nfs mount does not work

Yes I did a 'exportfs -a' after every change.

Thanks for the remark, I suppose you don't see any other mistake!?!

Oliver
Oliver Schmitz
T G Manikandan
Honored Contributor

Re: nfs mount does not work

Any changes you make to the /etc/exports file you need to export it to the clients

Just do a

#exportfs -a
V. Nyga
Honored Contributor

Re: nfs mount does not work

Hi,

I would test it without restrictions (-root...)
and try:
'mount servername:/TEST_DATA/msx_box /DATA nfs rw,hard 0 0'.
A 'ping hostname' at the server and a 'ping servername' at the client is ok?

Volkmar
*** Say 'Thanks' with Kudos ***
T G Manikandan
Honored Contributor

Re: nfs mount does not work

check the permissions of the dir

Make sure it is atleast 755 for the directories

rwxr-xr-x
Stanimir
Trusted Contributor

Re: nfs mount does not work

Hi!
You could check:
/etc/hosts
/etc/rc.config.d/nfsconf,
where NFS_SERVER=1,START_MOUNTD=1;

Your "mount"-syntax have to be:
mkdir /DATA
mount -F nfs srvname:/TEST_DATA/msx_box /DATA

Regards.
Zigor Buruaga
Esteemed Contributor

Re: nfs mount does not work

Hi,

Take a look at this link:
http://www.ussg.iu.edu/hypermail/linux/kernel/0004.1/0162.html

It talks about the option "nolock", maybe it can be helpful.

Kind regards,
Zigor
V. Nyga
Honored Contributor

Re: nfs mount does not work

Hi again,

is nfsd and biod running?

Volkmar
*** Say 'Thanks' with Kudos ***
T G Manikandan
Honored Contributor

Re: nfs mount does not work

If the above suggestions do not work

try re-starting your nfs server daemons.

if your nfs -server is linux then do a
#/etc/init.d/nfs stop
#/etc/init.d/nfs start

If you are using hpux as nfs server

#/sbin/init.d/nfs.server stop
#/sbin/init.d/nfs.server start


REvert
Oliver Schmitz
Regular Advisor

Re: nfs mount does not work

Dear all,

I tested everything above and it is not working at all.

Any other suggestions are still wanted. One remark: The OS to which I try to mount the remote FS is an embedded Linux with Kernel 2.4.20.
The vendor could not tell me yet wether nfs mount is possible at all. I do not see any problems, but that will have no meaning! Does anybody of you see some serious problems or reasons why it could not work?

Thanks for some more comments.

Best regards,

Oliver
Oliver Schmitz
Todd Whitcher
Esteemed Contributor

Re: nfs mount does not work

Hi Oliver,

Permission Denied is coming from the NFS servers rpc.mountd program. What rpc.mountd wants to do on the HP side is verify hostname / ip address is correct compaired to its access control lists. Have you tried an empty access control lists which would allow anyone to mount ?

You can just do:

exportfs -i /TEST_DATA/msx_box

I tested this on Red Hat 9 Linux 2.4.20-18.9 this a.m. from a HPUX NFS server running 11.11 w/ out a problem.

I have a few suggestions for testing:

On the HPUX NFS Server, verify you are resolving the hostname the same way you are specifying it in the /etc/exports. I would suggest using the Fully Qualified Domain name of the Linux NFS client in the /etc/exports.

/Test_DATA/msx_box -root=hostname.domain.com,access=hostname.domain.com

Re-export
# exportfs -av

For good measure, kill the running /usr/sbin/rpc.mountd on the HPUX server and restart it ( it tends to cache failed attempts depending on the version of your NFS patches ). I'd do this every time you made changes to make sure rpc.mountd isnt cacheing the failures.

Before you attempt to mount from the Linux Client "Toggle" debug for rpc.mountd on the HPUX NFS server bye sending a kill to the running PID with the SIGUSR2 ( kill -17 ) signal. When you are done testing "Toggle" it back off w/ the same signal.

This will log all rpc.mountd requests ( good bad ugly ) to /var/adm/mountd.log



If you still receive permission denied from the NFS server check the log files, see what exactly it is complaining about. This will be a huge log file, but search for Permission Denied and you should see the log data.

Hope this helps

Todd





Todd Whitcher
Esteemed Contributor

Re: nfs mount does not work

Oliver,

Of course, if I re-read this post you may be exporting from the Linux and trying to mount on the HP..sorry.

This also works on my server with the following /etc/exports file.

/nfsexport sytemb.atl.hp.com(rw,insecure,sync,insecure_locks,no_root_squash)

Hope that helps !

Todd
Suresh Patoria
Super Advisor

Re: nfs mount does not work

Hi,

1) Check the /etc/hosts file

2) check the permission of the mount point directory

3)try to export directory with full permission from server

after above cheges manually stop and start the service

then you check the status using the exportfs -v commnad

If it showing correctly then check the client side rpc service running or not

check the service using rpcinfo -p command

all the service OK then try to mount the nfs file system

use the command :
mount -F nfs -o rw server:/directory /mountpoint

ll /mountpoint

Thanx