Migrating from NFS3 to NFS4
How to make the transition as seamless as possible? I found out the hard way, it’s not as easy as remounting with -t nfs4!
server is already exporting /home through /etc/exports
/home 10.4.91.0/24(rw,no_root_squash,async)
Create the NFS4 pseudofilesystem:
mkdir /NFS4
chmod 777 /NFS4
Create a place for /home to go
mkdir /NFS4/home
mount –bind /home /NFS4/home
make it permanent in /etc/fstab
/home /NFS4/home none defaults,bind 0 0
export /NFS4 and /NFS4/home. /NFS4 must have fsid=0 to indicate it’s the root of the pseudofilesystem
/home 10.4.91.0/24(rw,no_root_squash,async)
/NFS4 192.168.1.0/24(rw,fsid=0,no_subtree_check,sync,no_root_squash)
/NFS4/home 192.168.1.0/24(rw,no_subtree_check,sync,no_root_squash)
because of this NFS4 pseudofilesystem stuff, clients don’t mount /NFS4/home, they mount /home! If you have -t nfs4 then it’s actually mounting /NFS4/home, otherwise it mounts /home through NFS3.
Going to test this a couple of times to make sure it’s correct, cranking out another xen instance (yay for kickstart!) to make the tests more accurate.

Thanks. This is going to make my nfs deployment really easy to migrate to v4.
September 4th, 2009 at 5:49 pmNice. I had some extra trouble with the UID/GID propagation, where the client gave me some way out integers.
Trouble was that I forgot to run the rpc.idmapd (that’s the name on Gentoo) that does the translation. (Remember to configure it so it matches the NFS server!)
October 4th, 2009 at 1:20 pm>>>make it permanent in /etc/fstab
>>>/NFS4/home /home none defaults,bind 0 0
hmm… may be contrary?
July 14th, 2010 at 5:23 pm/home /NFS4/home none defaults,bind 0 0
You are right, I’ve fixed the post, thanks!
Sean
July 15th, 2010 at 6:57 amThanks, that pseudo filesystem stuff almost bit me!
January 4th, 2011 at 1:36 pm