Sean’s Obsessions

Sean Walberg’s blog

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.

Comments

I’m trying something new here. Talk to me on Twitter with the button above, please.