Simultaneous database access

Michael Menge michael.menge at zdv.uni-tuebingen.de
Wed Aug 16 16:31:40 EDT 2006


This subject has also been on this list a few weeks ago. Look for the subject

"High availability email server"

Quoting Wesley Craig <wes at umich.edu>:

> On 16 Aug 2006, at 14:52, David Korpiewski wrote:
>> My director had us go back to using our Macs to try to build a   
>> failover cluster.   We were able to set up two mail servers sharing  
>>  the same backend XSAN.   We put our database for cyrus on the XSAN  
>>  and had both mail servers use _the same_ database and the same  
>> mail  store locations.
>>
>> So far in limited testing it works flawlessly.  This is very   
>> strange to us.  Is cyrus set up to allow multiple simultaneous   
>> accesses to its database without corruption or are we just lucky to  
>>  not have corrupted the database yet?
>>
>> This is cyrus 2.2.12 running on two OSX 10.4.7 servers.
>
> The main process which updates mailboxes.db etc on a backend server is
> imapd.  Since multiple imapd's are allowed, as long as your XSAN
> provides appropriate locking, you are not "just lucky".  See the
> compile documentation for a discussion of how to select the locking
> method:
>
> 	    --with-lock=METHOD
>             Specifies the locking method to use. Currently implemented
>             locking methods are:
>
>             flock   flock() locking
>             fcntl   fcntl() locking
>
>             By default, configure uses "fcntl" if the "fcntl()" function
>             exists, "flock" otherwise.
>
>
> AFAIK, fcntl( ..., F_SETLK*, ...) always locks the whole file, a la
> flock().  Also, I think I see a bug in master/service.c, where instead
> of using the locking method specified during compile-time, fcntl() is
> always used.
>
> :wes
> ----
> Cyrus Home Page: http://asg.web.cmu.edu/cyrus
> Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
> List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html



--------------------------------------------------------------------------------
M.Menge                                 Tel.: (49) 7071/29-70316
Universitaet Tuebingen                  Fax.: (49) 7071/29-5912
Zentrum fuer Datenverarbeitung          mail: menge at zdv.uni-tuebingen.de
Waechterstrasse 76
72074 Tuebingen



More information about the Info-cyrus mailing list