Is it feasible to have home folder hosted with NFS?

I'm planning to deploy some kiosk computers and would like to leave them with a small pendrive as boot disk, keeping the rest at an easy to back up server, ala LTSP.

Right now I'm pondering two options. An NFSed /home/, or a local copy of ~/ copied on login, rsynced on logout.

My fears are that working with files might get too slow, or my network might get clogged.


Solution 1:

I use NFS for my home directories in our production environment. There are a couple of tricks.

  1. Don't NFS mount to /home - that way you can have a local user that allows you in in the event that the NFS server goes down. We mount to /mnt/nfs/home

  2. Use soft mounts and a very short timeout - this will prevent processes from blocking forever.

  3. Use the automounter. This will keep resource usage down and also means that you don't need to worry about restarting services when the NFS server comes up if it goes down for some reason.

    auto.master:
      +auto.master
      /mnt/nfs /etc/auto.home --timeout=300
    
    auto.home
       home -rw,soft,timeo=5,intr      home.bzzprod.lan:/home
    
  4. Use a single sign-on system so you don't run into permission related issues. I have an OpenLDAP server.

Solution 2:

Be careful with the soft mounts! Soft mounting an NFS filesystem means IO will fail after a timeout occurs. Be very sure that is what you want on users' home directories! My guess is you don't. Using a hard mount on home directories in combination with the intr option feels a lot safer here.

Hard will not timeout: IO operations will be retried indefinitely. The intr option makes it possible to interrupt the mounting process. So if you mount the export and experience a failure, the hard-mount will lock your session. The intr option will make it possible to interrupt the mount, so the combination is pretty safe and ensures you will not easily lose a user's data.

Anyway, autofs makes this all even easier.

Solution 3:

HowtoForge posted an article titled Creating An NFS-Like Standalone Storage Server With GlusterFS On Debian Lenny, you may want to check it out.

Here is a short description of why it's a good "feasible" alternative to NFS, from the GlusterFS project page:

GlusterFS self-heals itself on the fly. There is no fsck. Storage backend is accessible directly as regular files and folders (NFS style). With replication enabled, GlusterFS can with-stand hardware failures.

More information can be found in the project documentation.

Also, another nice thing about using GlusterFS is if you need more space on your SAN you just add another storage brick (server node) and you are able to scale/grow your storage in parallel when there is need.