LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-25-2014, 08:03 PM   #1
ernieball
LQ Newbie
 
Registered: Apr 2010
Posts: 5

Rep: Reputation: 0
Mounting nfs failing


Hi.

I'm trying to mount an nfs share on a client directory, but I get this error:

Quote:
# mount server.ip:/directory /home/user/dir
mount.nfs: access denied by server while mounting server.ip:/directory
I suspect I need to state username and password for auth to server, but I haven't found how to give it.

How can I mount with login/why do I get this error?

thanks a lot for all help
 
Old 10-25-2014, 11:25 PM   #2
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware
Posts: 7,096
Blog Entries: 9

Rep: Reputation: Disabled
Hi:

I'm surprised that a Authentication Request window isn't opening and asking for your username and password. Check and see if the Web Server Authentication is "enabled".
http://docs.oracle.com/cd/E19728-01/...th.html#config

-:-Make sure that your nfs is up and running properly on the server-:-

I looked up the error your having.
This thread might help-
http://www.linuxquestions.org/questi...unting-934161/

http://www.linuxquestions.org/questi...-mount-921984/

In order to mount there has to be a 'mount point'-
Code:
#mount -t nfs server ip/location/to/dir    /mount/point
http://docs.oracle.com/cd/E19253-01/...423/index.html

Hope that helps-
 
Old 10-26-2014, 04:55 AM   #3
grubby
LQ Newbie
 
Registered: Oct 2014
Distribution: Centos 6.5
Posts: 16

Rep: Reputation: Disabled
Sounds to me your exports file is not properly configured.

Can you post your /etc/exports file? It should be on that server.ip host.
 
Old 10-26-2014, 07:55 AM   #4
ernieball
LQ Newbie
 
Registered: Apr 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Hi.

Yes. On server, which is actually a NAS running a nfs server as well..:

Quote:
$ cat /etc/exports
/nfs/Public *(ro,all_squash,sync,insecure,anonuid=65534,anongid=65534)
/nfs/Download *(ro,all_squash,sync,insecure,anonuid=65534,anongid=65534)
/nfs/nas *(rw,all_squash,sync,insecure,anonuid=65534,anongid=65534)
Quote:
showmount -e localhost
Export list for localhost:
/DataVolume/nas *
/DataVolume/Public *
/DataVolume/Download *
On clientside

Quote:
# showmount -e 10.15.11.100
Export list for 10.15.11.100:
/DataVolume/nas *
/DataVolume/Public *
/DataVolume/Download *
So i guess the service is running, but when I try to mount from client, I get this:

Quote:
# mount -t nfs -v 10.15.11.100:/DataVolume/nas /home/user/nfs/
mount.nfs: timeout set for Sun Oct 26 13:53:30 2014
mount.nfs: trying text-based options 'vers=4,addr=10.15.11.100,clientaddr=10.15.15.10'
mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting 10.15.11.100:/DataVolume/nas

# ls -l /home/user/
drwxrwxrwx 2 user user 4096 Oct 26 01:58 nfs

Why am I denied?

Last edited by ernieball; 10-26-2014 at 08:00 AM.
 
Old 10-26-2014, 08:21 AM   #5
grubby
LQ Newbie
 
Registered: Oct 2014
Distribution: Centos 6.5
Posts: 16

Rep: Reputation: Disabled
I don't understand exactly how the /nfs/nas gets shown as /DataVolume/nas in the showmount. thats not what I usually see in nfs exports, but perhaps is a version 4 thing, which i'm not too familiar with.

I see it's trying to mount as version 4 NFS in your error output.
Could you try:

mount -t nfs -o vers=3 -v 10.15.11.100:/DataVolume/nas /home/user/nfs/

to force it to use version 3 and see what happens?

also, just for troubleshooting purposes you could try:

mount -t nfs -v 10.15.11.100:/nfs/nas /home/user/nfs/

or maybe try a different mountpoint (create a simple empty dir in / and try mounting it on that)
 
Old 10-26-2014, 09:12 AM   #6
ernieball
LQ Newbie
 
Registered: Apr 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
# mount -t nfs -v -o vers=3 10.15.11.100:/DataVolume/nas /home/user/nfs/
mount.nfs: timeout set for Sun Oct 26 15:11:02 2014
mount.nfs: trying text-based options 'vers=3,addr=10.15.11.100'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 10.15.11.100 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 10.15.11.100 prog 100005 vers 3 prot UDP port 929
10.15.11.100:/DataVolume/nas on /home/user/nfs type nfs (rw,vers=3)
This worked fine. The NAS is mounted and I can ls /home/user/nfs on client

So it was a version issue the probably :P

Thanks a lot for your help !
 
Old 10-26-2014, 09:46 AM   #7
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware
Posts: 7,096
Blog Entries: 9

Rep: Reputation: Disabled
Quote:
Originally Posted by grubby View Post
I don't understand exactly how the /nfs/nas gets shown as /DataVolume/nas in the showmount. thats not what I usually see in nfs exports, but perhaps is a version 4 thing, which i'm not too familiar with.

I see it's trying to mount as version 4 NFS in your error output.
Could you try:

mount -t nfs -o vers=3 -v 10.15.11.100:/DataVolume/nas /home/user/nfs/

to force it to use version 3 and see what happens?

also, just for troubleshooting purposes you could try:

mount -t nfs -v 10.15.11.100:/nfs/nas /home/user/nfs/

or maybe try a different mountpoint (create a simple empty dir in / and try mounting it on that)
Thanks!-
 
Old 10-26-2014, 12:26 PM   #8
grubby
LQ Newbie
 
Registered: Oct 2014
Distribution: Centos 6.5
Posts: 16

Rep: Reputation: Disabled
Your welcome

Most likely, the NFS server on your SAN only support NFSv3, while some recent linux distribution versions switched their defaults to v4.
 
  


Reply

Tags
nfs mount network


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installer failing to look for kickstart file on nfs server... tdbabar Red Hat 3 09-25-2007 12:21 AM
NFS mount failing sidra Red Hat 3 04-20-2007 07:49 PM
NFS export to localhost failing XicKy Linux - General 1 12-14-2006 12:47 PM
nfs client on knoppix 3.9 - problem mounting nfs drive Rod Butcher Linux - Networking 1 09-21-2005 04:18 AM
Install from NFS Share Failing Tarwn Slackware - Installation 5 03-21-2005 04:17 PM


All times are GMT -5. The time now is 02:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration