Pattern - NFS Filestore

Contents

Pattern - NFS Filestore

NFS, Network File System, is the defacto standard for network storage in the Unix/Linux world.

Features

  • NFS communications is built on SunOS RPC; UDP packets are sent to the server(s), responses are also returned as NFS packets.
  • Servers export parts of their filesystem to external callers, possibly restricting it by IP Address.
  • User management is based on user ids; uids must be common across all nodes in the cluster

Advantages

  • NFS is ubiquitous and stable in the Unix/Linux world.
  • NFS clients are built into the Linux OS; NFS drives can be mounted as if they were local filesystems.
  • The UDP protocol allows a single server to handle many clients, as there is no need to keep a TCP channel open for every client.
  • NFS clients can handle the restart of a server, provided they make no attempt to access the server while it is down/unreachable.
  • Security is easy to configure.
  • Can be configured to allow remote access.

Disadvantages

  • The UDP protocol moves the ability to detect network partitions and server failures from the TCP protocol level (with its keep-alive option) to the NFS client.
  • The failure of an NFS server is only detected when an attempt is made to access the disk
  • The kernel-side code to work with NFS-mounted filestores reacts to failures by locking up for 30s or longer, printing to the console the dreaded message NFS Server not responding -still trying
  • There is no way for application-specific policy to handle failures.
  • Security is effectively nonexistent. Anyone who gains access to the LAN has access to the filestore under any user account that the NFS server provides access to.
  • Locking is, again, pretty weak.

SmartFrog support

We have used NFS storage in some of our applications. When it works, it works, but when it fails, all the client machines lock up kernel-side simultaneously. We can see this in the logs; 30s pauses, delays which stop higher-level protocols such as Anubis from providing high-availability services.

We have also provided remote NFS access to datacentres on specific projects. The advantage of this is that it is easy for unix client systems to mount a remote server; there is no need for the client to change to gain easy upload/download operations. The disadvantage is that long-haul NFS is even less reliable and secure than short-haul NFS.

Get SmartFrog at SourceForge.net. Fast, secure and Free Open Source software downloads