Gnuru.org
Productive Linux


Subscribe

 Subscribe via Feedburner in a reader

Enter your email address:

Delivered by FeedBurner


Login
Login:
Password:



Don't have an account?
Sign up to Gnuru.org
Forgot your password?

NFSv4 Really Rocks if You Can Get It Working
14 April 2011 @ 14:10 BST
by Paul

I've just spent hours trying to get a nfsv4 mount working, and one of the chief problems was that the documentation is not quite complete.

  1. You need to use nfs-kernel-server, nfs-user-server don't work.
  2. You need to create a phantom filesystem, in my case /nfs4exports, nice and descriptive.
  3. You need to specify the right options in the exports file. Something like:
    /nfs4exports                   hostname(rw,sync,fsid=0,crossmnt)
    
    should do.
  4. Subdirectories to your exports need to have a different fsid, so:
    /nfs4exports/hotsexyillegallydownloadedmusic                   hostname(rw,sync,fsid=1,crossmnt)
  5. You need to use a bind mount to associate your new nfs4 exports tree with your old nfs3 exports. Easiest way to do this is to add to your /etc/fstab:
    /old/nfs/shares /nfs4exports/hotsexyillegallydownloadedmusic none bind 0 0
  6. And most importantly, if you do the step set out in 5, then you need to add the unhide option to your /etc/exports file, so:
    /nfs4exports/hotsexyillegallydownloadedmusic                   hostname(rw,sync,fsid=1,crossmnt,unhide)

The last step is really important otherwise you get a 'stale nfs file handle error'. Why doesn't any of the documentation include this?




Comments disabled