prog: (The Rev. Sir Dr. George King)
[personal profile] prog
Google and Wikipedia aren't coming through for me on this one:

Imagine that we have a utility which, in the course of its duties, reads and writes files to a file system.

What sorts of behaviors would make it not NFS-safe? I thought NFS was totally transparent to man and beast alike, but perhaps this is not quite so?

Date: 2007-05-22 02:29 pm (UTC)
From: [identity profile] novalis.livejournal.com
I don't know much about NFS, but I recall something about file locking being a bit weird on NFS. This will depend on (a) your version of NFS, (b) the particular technique you use (fcntl, flock, O_EXCL/hard links), and (c) the particular version of the particular kernel you are using.

Date: 2007-05-22 03:23 pm (UTC)
From: [identity profile] jtroutman.livejournal.com
<-- What he said (and in more detail than I could have managed).

By default more NFS setups are not well optimized for speed or usability (you have to tune the settings in /etc/exports). You may or may not want the exported directories to be able to be used with root privs. You may need to deal with "what if" exception conditions in your process start-up. In my experience, a process will simply block forever if the NFS mount is not available (such as if the machine goes away, or connectivity to the machine goes away while it is mounted).

Also, you can't ever have multiple clients append to the same file via NFS.

This site will help you:

http://nfs.sourceforge.net/

Date: 2007-05-22 03:10 pm (UTC)
From: [identity profile] ubiquity.livejournal.com
The only case I know of is if something else is attempting to write to that same file at the same time.

August 2022

S M T W T F S
 123456
78910111213
14151617181920
21222324252627
28 293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 15th, 2025 03:16 am
Powered by Dreamwidth Studios