Client recovery of NFS mount

Client recovery of NFS mount

Oron Peled oron at actcom.co.il
Sun May 23 23:14:53 IDT 2010


On Sunday, 23 בMay 2010 21:57:22 Tom Rosenfeld wrote:
> On Wed, May 12, 2010 at 11:36 PM, Oron Peled <oron at actcom.co.il> wrote:
> > ...
> > Move to NFS4 (both server and clients of course). I have done it some 2
> > years ago and it pays big time in reliability (also performance, but
> > that's less noticable in my (low-volume) case).
> Thanks guys. I also use "hard, intr" and it usually works fine, but not
> always. :-(
> I have read that NFS4 is better in this respect, but never looked into it.
> If both my client and server support NFS4 is it just a matter of adding it
> as mount option?

Not exactly.

Client side:
 * It's not a mount option but a separate 'nfs4' file system type.

 * This means the line in /etc/fstab looks like this:
       server:/home /home nfs4 rw,hard,intr 0 0

Server side:
 * All NFS4 exports from the same host are treated as "volumes"
   under a common root directory.
   (Technically, the client mounts only this).

 * A sample /etc/exports (with an arbitrary "root" export directory):
      /nfs4exports        192.168.1.0/24(rw,fsid=0)
      /nfs4exports/home   192.168.1.0/24(rw)
      /nfs4exports/mail   192.168.1.0/24(rw)

 * Notes:
   - The "fsid=0" export option, this signify the "root" export.
   - Obviously, the directory structure has to be created first.

 * You can use bind mounts on the server to relocate different trees
   into the nfs4 "root export". An example /etc/fstab:
      /home            /nfs4exports/home none    bind    0 0
      /var/spool/mail  /nfs4exports/mail none    bind    0 0

Enjoy,

-- 
Oron Peled                                 Voice: +972-4-8228492
oron at actcom.co.il                  http://users.actcom.co.il/~oron
"I love deadlines, especially the whooshing sound they make as they go by." 
      -- Douglas Adams



More information about the Linux-il mailing list