Lately we’ve had a secu­rity prod­uct at work that allows for secure end to end file shar­ing via NFS.  That is about the best thing I can say about NFS at this point.   For those not famil­iar with NFS wikipedia has this descrip­tion:

 Net­work File Sys­tem (NFS) is a net­work file sys­tem pro­to­col orig­i­nally jointly devel­oped by Sun Microsys­tems and IBM in 1984, allow­ing a user on a client com­puter to access files over a net­work as eas­ily as if the net­work devices were attached to its local disks. NFS, like many other pro­to­cols, builds on the Open Net­work Com­put­ing Remote Pro­ce­dure Call (ONC RPC) sys­tem. The Net­work File Sys­tem pro­to­col is spec­i­fied in RFC 1094, RFC 1813, and RFC 3530 (which obso­letes RFC 3010).

Now you may go a net­work­ing file sys­tem how can I guy hate that?  The eas­i­est answer is that the bane part of my exis­tence over this stems from group file shar­ing.   There is a group in the office that needs shared access to the files that are located on the NFS share.   The rea­son this is an issue is that they all access the files at the same time.

The issue where we are hav­ing prob­lems is that the NFS prod­uct does not sup­port file lock­ing.   This means that mul­ti­ple users can all have the same file open at the same time and save the file at the same time.   This causes over­writ­ing of the file and leads to cor­rup­tion of said files.

NFS as a pro­to­col does not include manda­tory file lock­ing.   If file lock­ing would have been included back in 1984 in the RFC spec­i­fi­ca­tion this wouldn’t an issue.  I am assum­ing the orig­i­nal RFC writ­ers didn’t fathom that mul­ti­ple peo­ple would have the file open at the same time over a net­work, when net­work­ing was rare and not ubiquitous.

Now before I hear com­ments or e-mails about the statd and lockd that adds optional file lock­ing, I would like to point out the “optional” part of that line.   While there have been meth­ods to shoe horn file lock­ing abil­i­ties into NFS so it can keep up with pro­to­cols such as CIFS, Web­DAV, and mul­ti­tudes of other “mod­ern” file shar­ing pro­to­cols, it’s like putting sneak­ers on an ele­phant — since it’s not manda­tory no one is going to do it and it never will work right.

I’m just vent­ing my frus­tra­tions on pro­to­cols that would due bet­ter to be obso­leted com­pletely then try­ing to make a patch­work quilt out of them.

I’m really not alone on this line of thought, some­one wrote a paper called “Use of NFS Con­sid­ered Harm­ful”.  I have since used this paper in my case to man­age­ment of why this imple­men­ta­tion is a ter­ri­ble idea.

  • grin
    It sucks that we do not have an alternative. I've been playing with several sharing methods now, they either fail to be intercompatible or die on network errors or unreliable or have worse locking. Maybe next year.
  • I completely agree - though I wont' move my home to NFS just because of the file locking issue - I'll deal with SMB for the time being - and yes I know that SMB is no good either and doesn't come close to the intent of NFS.
blog comments powered by Disqus