Re: [Exim] Large-scale deployment of exim (Solaris/FC-AL/etc…

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: Elwood Blues
CC: exim-users
Sujet: Re: [Exim] Large-scale deployment of exim (Solaris/FC-AL/etc.)
On Thu, 28 Mar 2002, Elwood Blues wrote:

> I am looking at using Fibre Channel to interface with a storage device.
> The reason behind this idea was not because of faster disk access or the
> now relatively low cost of Fibre Channel equipment, but because of the
> support for having multiple servers on the FC-AL loop. Ideally what I
> would like is something like this (scaled down to simplify example):
>
> | server-A |-------| drive array |-------| server-B |
>
> Where server-A and server-B have the drive array, which will be
> set up as a single partition, mounted read-write as /var/mail
> for mail-spool storage. The servers will have their own internal
> system disks. Assuming that any program accessing the mail
> spools locks the spool via fcntl(), would this be possible?


I don't know anything about Fibre Channel. Is it purely hardware? If so,
the locking will apply only within the host that does it, I think.

However, using a lock file should (?) work.

> I was told this regarding file locking:
> File locking mechanisms (such as fcntl and flock) are for the most part A)
> Purely advisory in nature, and B) Within the process. When a process
> fcntl()'s a file descriptor, you must remember that the fd is unique to
> only that process.


(A) is true. (B) is false. It is trivial to write programs to show this.

> That seems to conflict with my daily experience with Exim and several
> different POP3 daemons. If exim has the spool locked, either while
> delivering mail or via exim_lock, the POP3 daemons cannot lock the
> spool and return an error to the user. Can anyone shed light on this
> concern as well?


> Any help or pointers would be greatly appreciated.


In the source file src/transports/appendfile.c of any Exim distribution,
there is a long essay in the form of a comment all about locking. In the
latest release it starts at line 1303. However, much of it is about NFS,
which is probably not relevant here.

Note that, by default, Exim uses *both* a lock file *and* fcntl().

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.