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.