mount -t nfs4 fails, but mount -t nfs succeeds [SOLVED]

Ed Greshko Ed.Greshko at greshko.com
Fri Apr 27 09:37:34 UTC 2012


On 04/27/2012 05:14 PM, Jonathan Ryshpan wrote:
> On Fri, 2012-04-27 at 16:10 +0800, Ed Greshko wrote:
>> First, it may be helpful for you to post the contents of your
>> server's /etc/exports
>> and /etc/fstab.
> Here they are.  /etc/exports is much chewed up by many experiments; this
> is its latest incarnation.  /etc/fstab follows.
>         $ more exports
>         /               amito(rw,fsid=root,no_root_squash)
>         # /home/jonrysh amito(rw,no_root_squash)
>         # /var          amito(rw,no_root_squash)
>         # /nfs4exports  192.168.0.0/24(ro,root_squash,no_subtree_check,fsid=0) 
>         
>         # /nfs4exports         192.168.0.0/24(ro,fsid=root,insecure,no_subtree_check,no_root_squash) 
>         # /nfs4exports/home    192.168.0.0/24(rw,nohide,insecure,no_subtree_check,no_root_squash)
>         # /nfs4exports/sbin    192.168.0.0/24(rw,nohide,insecure,no_subtree_check,no_root_squash)
>         
>         # /nfs4exports         192.168.2.5(ro,fsid=root,insecure,no_subtree_check,no_root_squash) 
>         # /nfs4exports/home    192.168.2.5(rw,nohide,insecure,no_subtree_check,no_root_squash)
>         # /nfs4exports/sbin    192.168.2.5(rw,nohide,insecure,no_subtree_check,no_root_squash)

For comparison, here is the relevant portion of my exports file....

/nfs4exports           
192.168.0.0/24(ro,sync,insecure,root_squash,no_subtree_check,fsid=0)
/nfs4exports/syntegra  
192.168.0.0/24(rw,nohide,sync,insecure,root_squash,no_subtree_check)
/nfs4exports/myhome    
192.168.0.0/24(rw,nohide,sync,insecure,root_squash,no_subtree_check)

>         
>         $ more fstab
>         # /etc/fstab
>         # Created by anaconda on Fri Mar 30 11:08:48 2012
>         #
>         # Accessible filesystems, by reference, are maintained under '/dev/disk'
>         # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
>         #
>         UUID=2df88f7e-a779-401a-8e47-0c32d500b5af /               ext4    defaults        1 1
>         UUID=d64559f2-2e25-4a96-a937-bbe06516ab2c /boot           ext4    defaults        1 2
>         UUID=2d7ec72f-f9af-4ec8-aff0-03d07ef30b73 /var            ext4    defaults        1 2
>         UUID=5fb1efb6-3e12-437f-a12e-b60cb622d001 swap            swap    defaults        0 0

Can we assume you've issued the "mount --bind " commands on your server?  (a df would
show it) These don't survive reboots.  So, eventually you will need the appropriate
lines in your fstab.  These are mine for reference.

/syntegra               /nfs4exports/syntegra   none    rw,bind 0 0
/home/egreshko          /nfs4exports/myhome     none    rw,bind 0 0

and the output of df shows in part...

/syntegra             80634688  58323932  18214756  77% /nfs4exports/syntegra
/home/egreshko       366919872 186333032 161964808  54% /nfs4exports/myhome


>
>> Second, have you modified your idmap.conf such that you have identical
>> Domain =
>> lines?  Note that after modification the nfs-idmap.service needs to be
>> restarted. 
> You must mean /etc/idmapd.conf .  This file is untouched on both client
> and server.  It has a single "Domain = ..." line, which is commented
> out.  

Well, this is mainly used for proper uid/gid mapping between client and server.  They
don't have to be "real".  They can be set to mydomain.com or maybe even left
blank....can't recall.

But, you will need to enable nfs-idmap.service on F16 to have your uids/gids mapped. 
Otherwise you'll run into read/write permission problems.


-- 
Never be afraid to laugh at yourself, after all, you could be missing out on the joke
of the century. -- Dame Edna Everage


More information about the users mailing list