Sean’s Obsessions


  • I'm a happy Linode customer. This is a Linode 540 VPS. Linode periodically increases RAM and disk while keeping costs steady, which makes them the natural choice.
  • Archives

24 Jun

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.

5 Responses to “Migrating from NFS3 to NFS4”

  1. 1
    Dan Says:

    Thanks. This is going to make my nfs deployment really easy to migrate to v4.

  2. 2
    Morten Says:

    Nice. 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!)

  3. 3
    Shad0w Says:

    >>>make it permanent in /etc/fstab
    >>>/NFS4/home /home none defaults,bind 0 0

    hmm… may be contrary?
    /home /NFS4/home none defaults,bind 0 0

  4. 4
    sean Says:

    You are right, I’ve fixed the post, thanks!

    Sean

  5. 5
    Tobias McNulty Says:

    Thanks, that pseudo filesystem stuff almost bit me!

Leave a Reply

© 2012 Sean’s Obsessions | Entries (RSS) and Comments (RSS)

Powered by Wordpress, design by Web4Sudoku, based on Pinkline byGPS Gazette