Page 1 of 1

NFS, mounting problems.

Posted: 13 Jul 2011, 05:08
by agkbill
For long time I have used NFS without problems. But after change of hard drives and reinstall I can not get it to work.

I use to mount manually (from Kubuntu) with:

Code: Select all

sudo mount -t nfs 192.168.10.1:/home/christer /bubba2
But now I get errors like.

Code: Select all

christer@Kubuntu:~/Documents$ sudo mount -t nfs 192.168.10.1:/home/christer /bubba2
[sudo] password for christer: 
mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
mount.nfs: an incorrect mount option was specified
christer@Kubuntu:~/Documents$
Solved with "-o nolock", but then new error:

Code: Select all

christer@Kubuntu:~/Documents$ sudo mount -t nfs -o nolock 192.168.10.1:/home/christer /bubba2
mount.nfs: access denied by server while mounting 192.168.10.1:/home/christer
christer@Kubuntu:~/Documents$ 
Solved by adding following to my /etc/hosts.allow This I did not have to do in my previous working NFS setup.

Code: Select all

# /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.
#

portmap:        ALL:
rpc.mountd:     ALL:
But now I get the error:

Code: Select all

christer@Kubuntu:~/Documents$ sudo mount -t nfs -o nolock 192.168.10.1:/home/christer /bubba2
mount.nfs: requested NFS version or transport protocol is not supported
christer@Kubuntu:~/Documents$
My /etc/exports

Code: Select all

# /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/christer    192.168.1.135(rw,no_subtree_check,sync,no_root_squash,anonuid=1001,anongid=100)
/home/storage     192.168.1.135(rw,no_subtree_check,sync,no_root_squash,anonuid=1001,anongid=100)
I want to access files like user "christer" on bubba2.

Code: Select all

bubba:/home/christer# id christer
uid=1001(christer) gid=100(users) groups=100(users)
bubba:/home/christer#
My user on client side.

Code: Select all

christer@Kubuntu:~/Documents$ id christer
uid=1000(christer) gid=1000(christer) groups=4(adm),20(dialout),24(cdrom),46(plugdev),113(lpadmin),118(admin),120(sambashare),1000(christer)
christer@Kubuntu:~/Documents$
The folder I try to mount on.

Code: Select all

drwxr-xr-x   2 christer christer  4096 2011-06-19 13:50 bubba2
Installed on bubba are nfs-kernel-server, nfs-common, and portmap.

I guess I missed something here but cant put my finger on it.


Any ideas?

Thank you.
/Christer

Re: NFS, mounting problems.

Posted: 13 Jul 2011, 15:17
by Cheeseboy
Hi agkbill,

I think I got a very similar error about incorrect protocol version when I moved from Bubba2 to Bubba3.
I didn't have that issue with Ubuntu, but you didn't mention what version you are on.

Anyway, have a look at this, it might help:
http://forum.excito.net/viewtopic.php?f=8&t=2636

Basically, add:

Code: Select all

-o vers=3
Hope it might help!

Cheeseboy