[Exim] Re: spool over NFS?

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Miquel van Smoorenburg
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: [Exim] Re: spool over NFS?
In article <jbm.20040602112427.2ae29969@User21>,
Edgar Lovecraft <exim-list@???> wrote:
>"Miquel van Smoorenburg wrote:
>>
>> Edgar Lovecraft <exim-list@???> wrote:
>> > As to too the locking issues that were 'patched', this has more to do
>> > with the systems you use, Linux has major problems with NFS and
>> > locking, even today, Sun/HP/AIX/SGI/etc. support NFS much better.
>>
>> The Linux NFS client has supported NFS locking for years
>> (since 2.2 or so).
>
>Yes it has, the problems I have always had with linux and NFS locking
>are across multiple clients accessing the same file:
>i.e.
>
>server => exports /nfs_share
>client1 => mounts /nfs_share
>client2 => mounts /nfs_share
>
>client1 => app1 opens and locks /nfs_share/file
>client1 => app2 sees the lock when accessing /nfs_share/file
>client2 => app1 opens and locks /nfs_share/file
>        as it does not see /nfs_share/file as being locked

>
>Now we have a major problem, as two different clients think they have
>'exclusive' access to the shared file /nfs_share/file, when only ONE
>of them should have access to the file at any given time.


Note that NFS locking only works with POSIX locks, it DOES NOT
work with flock() locks (on most OSes that is the case). So make
sure your apps use posix fcntl() locks only.

Also make sure you're using the kernel NFS server and are running
rpc.statd on server and client.

I just tested it to be sure (2.4 server, 2.4 client, 2.6 client)
and locking over NFS does work. It's not very fast though ..

Mike.