LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 08-02-2007, 02:36 PM   #1
Ingla
Member
 
Registered: Oct 2005
Distribution: Ubuntu 8.04, Ubuntu 10.04
Posts: 157

Rep: Reputation: 15
Cannot Mount NFS Share


Hello.

I'm trying to set up a Linux-Linux share. I'm running Ubuntu Feisty on one machine and Ubuntu Dapper (both "Desktop" installations) on the other... attempting to set up each as a server and a client, so I can work in either direction.

In general, I followed a howto at:
http://nfs.sourceforge.net/nfs-howto/ar01s03.html ,
with a little help from Google and other howto's here and there.


I've never set up a Linux network before, so I'm a newbie at this. I'm starting to suspect something might be wrong with the nfs programs themselves, but before that, here's some output for anyone who understands these things.

-------------------------------------------------------------------
/ect/exports:
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes hostname1(rw,sync) hostname2(ro,sync)
#
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt)
# /srv/nfs4/homes gss/krb5i(rw,sync)
#
/home/aba 0.0.0.0/0(rw) 10.0.0.2(rw) 10.0.0.139(rw)

-----------------------------------------------------------------
/etc/hosts.allow:
# /etc/hosts.allow: list of hosts that are allowed to access the system.
# See the manual pages hosts_access(5), hosts_options(5)
# and /usr/doc/netbase/portmapper.txt.gz
#
# Example: ALL: LOCAL @some_netgroup
# ALL: .foobar.edu EXCEPT terminalserver.foobar.edu
#
# If you're going to protect the portmapper use the name "portmap" for the
# daemon name. Remember that you can only use the keyword "ALL" and IP
# addresses (NOT host or domain names) for the portmapper, as well as for
# rpc.mountd (the NFS mount daemon). See portmap(8), rpc.mountd(8) and
# /usr/share/doc/portmap/portmapper.txt.gz for further information.
#
service: 10.0.0.2 , 10.0.0.3
portmap: 10.0.0.2 , 10.0.0.3
lockd: 10.0.0.2 , 10.0.0.3
rquotad: 10.0.0.2 , 10.0.0.3
mountd: 10.0.0.2 , 10.0.0.3
statd: 10.0.0.2 , 10.0.0.3

-----------------------------------------------------------------
/etc/hosts.deny:
# /etc/hosts.deny: list of hosts that are _not_ allowed to access the system.
# See the manual pages hosts_access(5), hosts_options(5)
# and /usr/doc/netbase/portmapper.txt.gz
#
# Example: ALL: some.host.name, .some.domain
# ALL EXCEPT in.fingerd: other.host.name, .other.domain
#
# If you're going to protect the portmapper use the name "portmap" for the
# daemon name. Remember that you can only use the keyword "ALL" and IP
# addresses (NOT host or domain names) for the portmapper. See portmap(8)
# and /usr/doc/portmap/portmapper.txt.gz for further information.
#
# The PARANOID wildcard matches any host whose name does not match its
# address.

# You may wish to enable this to ensure any programs that don't
# validate looked up hostnames still leave understandable logs. In past
# versions of Debian this has been the default.
# ALL: PARANOID
portmap:ALL
lockd:ALL
mountd:ALL
rquotad:ALL
statd:ALL

---------------------------------------------------------------
ps aux | grep portmap
daemon 4339 0.0 0.0 1768 380 ? Ss Jul30 0:00 /sbin/portmap
aba 10716 0.0 0.0 2888 768 pts/0 S+ 19:31 0:00 grep portmap

----------------------------------------------------------------
rpcinfo -p
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100005 1 udp 798 mountd
100005 1 tcp 801 mountd
100005 2 udp 798 mountd
100005 2 tcp 801 mountd
100005 3 udp 798 mountd
100005 3 tcp 801 mountd
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100021 1 udp 32909 nlockmgr
100021 3 udp 32909 nlockmgr
100021 4 udp 32909 nlockmgr
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100021 1 tcp 35975 nlockmgr
100021 3 tcp 35975 nlockmgr
100021 4 tcp 35975 nlockmgr
100024 1 udp 32910 status
100024 1 tcp 42428 status

-----------------------------------------------------------------
showmount -e 10.0.0.2
portmap getport: RPC: Success
-----------------------------------------------------------------
sudo mount -t nfs 10.0.0.2:/home/aba /media/Ubuntu-Shared
Password:
mount to NFS server '10.0.0.2' failed.
-----------------------------------------------------------------
So far, I've been sitting on the Feisty machine, trying to mount the Dapper machine's home directory. I've now tried it the other way around. On the Dapper machine I do get a reason "Permission denied". So, I made sure the folder on Feisty gave r/w permissions to everyone (the directories to mount to are set that way too), but no good.

There's a Troublshooting guide in the howto at:
http://nfs.sourceforge.net/nfs-howto/ar01s07.html

Went back to Feisty to check it out:

It says to run exportfs -ra, which I did.

I got this:
exportfs -ra
exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "0.0.0.0/0:/home/aba".
Assuming default behaviour ('subtree_check').
NOTE: this default will change with nfs-utils version 1.1.0
exportfs: invalid netmask `0' for 0.0.0.0
-------------------------------------------------------------------
Also, it said to check /proc/fs/nfs/exports and /var/lib/nfs/xtab. Both files are empty on both machines. I don't know what to write there. Apparently, nothing was put there automatically when I set up the server or ran exportfs -ra. That's why I'm wondering about the nfs programs themselves.

/var/lib/nfs/etab, /var/lib/nfs/rmtab, /proc/fs/nfs/exports, and/var/lib/nfs/xtab are all empty. My understanding is that running exportfs -r or -a is supposed to cause entries to be made (in some of these).

One more thing: Both machines have been online continously since I did the setup (I started all the daemons manually, except that I don't seem to have rpc.rquotad). I have not rebooted either.

Note: On Feisty, installation of NSF stuff did not create files hosts.allow or hosts.deny. I copied those files from Dapper and manually pasted them into Feisty (FTP), using the same ownership and permissions, and edited manually.

That's about all I know.

Does anyone have any idea what's wrong and how to get this running (mountable)?

Thanks very much.

Last edited by Ingla; 08-02-2007 at 02:40 PM.
 
Old 08-02-2007, 04:10 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,406

Rep: Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965
why are you trying to share for 0.0.0.0/0 ?? that's nuts, and wrong. the error message there is clearly complaining about that line, and you should never ever want to share to literally every ip in the entire world. narrow that down or just remove it completely as you already have other valid single host entries.
 
Old 08-02-2007, 08:18 PM   #3
Ingla
Member
 
Registered: Oct 2005
Distribution: Ubuntu 8.04, Ubuntu 10.04
Posts: 157

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by acid_kewpie
why are you trying to share for 0.0.0.0/0 ??
Thanks for the reply. The answer is I didn't enter that. The contents of the file were apparently created automatically when I used the GUI to shared the folder. Not knowing anything about this, I thought it was supposed to be there. I thought it was a local IP for the network.

I'll take it out.

But is that the reason I can't mount the shared folder from 10.0.0.2?
 
Old 08-02-2007, 08:29 PM   #4
Ingla
Member
 
Registered: Oct 2005
Distribution: Ubuntu 8.04, Ubuntu 10.04
Posts: 157

Original Poster
Rep: Reputation: 15
New information:

I changed the 0.0.0.0 to the IP of another machine I might want as a host later.

Then I ran exportfs -a and got this:

------------------------------------------------------------------
exportfs -a
exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "10.0.0.3:/home/aba".
Assuming default behaviour ('subtree_check').
NOTE: this default will change with nfs-utils version 1.1.0
exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "10.0.0.2:/home/aba".
Assuming default behaviour ('subtree_check').
NOTE: this default will change with nfs-utils version 1.1.0
exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "10.0.0.139:/home/aba".
Assuming default behaviour ('subtree_check').
NOTE: this default will change with nfs-utils version 1.1.0
exportfs: could not open /var/lib/nfs/etab for locking
exportfs: can't lock /var/lib/nfs/etab for writing
------------------------------------------------------------------

If it can't write to .../etab, wouldn't that prevent mounting?

Any idea why this is happening or how to fix it?
 
  


Reply


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
fstab entry does not mount nfs share nanbudh Linux - Networking 13 06-07-2012 02:05 PM
NFS mount of smb mount of windows share: permission denied problem :( Bagatur Linux - Networking 4 07-07-2009 11:34 AM
NFS File Share - Cannot Mount Ingla Linux - Software 6 08-06-2007 07:56 PM
Permission denied trying to mount nfs share leupi Linux - Networking 1 07-30-2007 01:32 AM
Can't mount nfs- or cifs-share rw in Debian pingu Linux - Networking 0 07-03-2007 07:43 AM


All times are GMT -5. The time now is 11:03 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration