[Box Backup] backup on nfs-mounted storage

Martin Ebourne boxbackup@fluffy.co.uk
Thu, 19 Oct 2006 11:38:19 +0100


Ben Summers <ben@fluffy.co.uk> wrote:
> What happens if you use both? Are the two mechanism independent?

 From the manpage on Linux:

        flock(2) does not lock files over NFS.  Use fcntl(2) instead: that does
        work  over  NFS,  given  a  sufficiently  recent version of Linux and a
        server which supports locking.

        Since kernel 2.0, flock(2) is implemented as a system call in  its  own
        right  rather  than  being  emulated  in the GNU C library as a call to
        fcntl(2).  This yields true BSD  semantics:  there  is  no  interaction
        between the types of lock placed by flock(2) and fcntl(2), and flock(2)
        does not detect deadlock.

Hence the wariness over new holes...

What does BSD do about file locking over NFS?

Cheers,

Martin.