sqlite over NFS (locking)

Patrice Dumas pertusus at free.fr
Sat Oct 6 11:03:20 UTC 2007


On Fri, Oct 05, 2007 at 01:39:26PM -0600, Orion Poplawski wrote:
>
> But use caution: this locking mechanism might not work correctly if the 
> database file is kept on an NFS filesystem. This is because fcntl() file 
> locking is broken on many NFS implementations. You should avoid putting 
> SQLite database files on NFS if multiple processes might try to access the 
> file at the same time.
>
>
> Now, is NFS fctl() locking really broken going from Fedora devel to Fedora 
> 7?  rpc.statd is running.  Filesystem is exported "sync".

fcntl() shouldn't be brocken on fedora, it seems to me to be an nfs bug
if it is. (looking at the web, looks like it should work from about linux 
2.2.13). Now it is true that nfs locking is more fragile than local file
locking, especially lock recovery and all the stuff that happens through
statd/lockd. Also there may be some issues between lockf/fcntl, but
unless I am wrong, this is not an issue on, at least, recent fedora. In 
any case if fcntl is not working in a well setup system, it is a bug. You 
can also have a look at

http://nfs.sourceforge.net/#faq_d7
http://nfs.sourceforge.net/#faq_d10

--
Pat




More information about the fedora-devel-list mailing list