linux-cluster | 1 Nov 2004 17:55

Re: IMAP server clustering ...

On Mon, Nov 01, 2004 at 10:25:03AM -0700, Michael Gale wrote:
> 
> I was reading up on Courier IMAP which use dot-locking with support NFS 
> mounted maildirs.
> 
> So would that application not take care of the locking ?

No, it's operating at the wrong level.

(starting from nothing cached)

Think about it this way - you create a new file on the disk (say the lock file).  The other
machine then tries to access the directory.  It scans down from the root of the partition
(successfully, since nothing has changed), and gets to the directory.  This finds the
lockfile.

So far so good.

Now the 1st machine deletes the lockfile.  However, the 2nd machine still has this cached as
locked - and therefore doesn't notice.

--

Other example.

Both machines read the directory (and it's not locked).  Next machine 1 locks it.  Even if
reiserfs writes this lock back to disk (which it will eventually), the 1st machine doesn't
know, since it still has a cached version of the directory which shows that the file doesn't
exist.  Now both can lock (successfully as far as they are concerned).

(Continue reading)

Michael Gale | 1 Nov 2004 19:26

Re: IMAP server clustering ...


That makes more sense ... thanks for the info and in helping me avoid 
corrupted data.

Michael.

linux-cluster <at> spam.dragonhold.org wrote:
> On Mon, Nov 01, 2004 at 10:25:03AM -0700, Michael Gale wrote:
> 
>>I was reading up on Courier IMAP which use dot-locking with support NFS 
>>mounted maildirs.
>>
>>So would that application not take care of the locking ?
> 
> 
> No, it's operating at the wrong level.
> 
> (starting from nothing cached)
> 
> Think about it this way - you create a new file on the disk (say the lock file).  The other
> machine then tries to access the directory.  It scans down from the root of the partition
> (successfully, since nothing has changed), and gets to the directory.  This finds the
> lockfile.
> 
> So far so good.
> 
> Now the 1st machine deletes the lockfile.  However, the 2nd machine still has this cached as
> locked - and therefore doesn't notice.
> 
> 
(Continue reading)

linux-cluster | 1 Nov 2004 19:59

Re: IMAP server clustering ...

On Mon, Nov 01, 2004 at 11:26:07AM -0700, Michael Gale wrote:
> 
> That makes more sense ... thanks for the info and in helping me avoid 
> corrupted data.
> 
> Michael.
> 

No worries - I have the best possible reason for remembering, that of personal experience.

I managed to miss that a partition was mounted on a solaris box (through veritas), and
therefore mounted it again manually (raw partition) somewhere else - the behaviour was
"interesting" until it got so bad I rebooted.

I ended up having to restore from the backup, which is why I remember it so vividly - we had
never tested the backups until then.

You've got me thinking tho.  Depending on how much of the caching is done in the filesystem
layer, and how much at the block device layer, it /might/ be possible to create a cluster
aware block device, and then use a normal FS on top of it.

Anyone around know enough to tell me how possible/not that would be?

If it was possible, it should be possible to implement things like mirroring & snapshots at
that level more easily than trying to do them higher up the chain.

However, that may just be total baloney, since I've not really thought it through - one of
those "I wonder" ideas that I don't know enough about at the moment to investigate.

Graham
(Continue reading)

David B Zafman | 1 Nov 2004 20:56
Picon
Favicon

Re: IMAP server clustering ...


See www.drbd.org

What is DRBD

DRBD is a block device which is designed to build high availability 
clusters. This is done by mirroring a whole block device via (a 
dedicated) network. You could see it as a network raid-1.

On Nov 1, 2004, at 10:59 AM, linux-cluster <at> spam.dragonhold.org wrote:

> On Mon, Nov 01, 2004 at 11:26:07AM -0700, Michael Gale wrote:
>>
>> That makes more sense ... thanks for the info and in helping me avoid
>> corrupted data.
>>
>> Michael.
>>
>
> No worries - I have the best possible reason for remembering, that of 
> personal experience.
>
> I managed to miss that a partition was mounted on a solaris box 
> (through veritas), and
> therefore mounted it again manually (raw partition) somewhere else - 
> the behaviour was
> "interesting" until it got so bad I rebooted.
(Continue reading)

gwood | 1 Nov 2004 22:11

Re: IMAP server clustering ...

On Mon, Nov 01, 2004 at 11:56:53AM -0800, David B Zafman wrote:
> 
> See www.drbd.org
It's not really what I was talking about.  The 2nd node in that only has a copy of the data
- it can't mount or access that volume in any way.


Gmane