Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As a common cause for file corruption, documentation often cites as cause "NFS that doesn't implement file-level locking correctly" or something similar, e.g., for SQLite:

How to corrupt an SQLite database file, paragraph 2.1

2.1 Filesystems with broken or missing lock implementations

SQLite depends on the underlying filesystem to do locking as the documentation says it will. But some filesystems contain bugs in their locking logic such that the locks do not always behave as advertised. This is especially true of network filesystems and NFS in particular. If SQLite is used on a filesystem where the locking primitives contain bugs, and if two or more threads or processes try to access the same database at the same time, then database corruption might result.

This – or something to this effect – has been frequently mentioned for over a decade, commonly in mixed Windows/Unix environments. However, I've never found any indication which network file systems (or client/server combinations) actually are at risk.

What can I tell my customers?

share|improve this question
Its not so much about filesystem as it is sharing protocol (NFS is not a filesystem despite the name). Samba does perform write-locking. – Frank Thomas Jun 27 '13 at 12:53
so it would be an issue between certain clients/servers? – peterchen Jun 27 '13 at 18:21
well, its a server issue. but you're mostly right. NFS should inform whatever underlying file system is present to implement a lock when a file is opened for write. that filesystem might be EXT, BTRFS, MurderFS, NTFS, or whatever else. All FS's have to deal with write locking, but the sharing protocol is responsible for brokering between the network request and the filesystem- specific semantics. unfortunately, NFS doesn't appear to do this well. I'm not sure why, but I would guess its a problem with the way it abstracts away the actual FS operations. – Frank Thomas Jun 27 '13 at 18:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.