Filesystem replication geom proposal

hywel at hmallett.co.uk hywel at hmallett.co.uk
Sun Jun 22 22:36:41 UTC 2008


Quoting Ivan Voras <ivoras at freebsd.org>:

> Hmmm. If I understand your proposal, you want to create IO journals on
> both the master and the slave, then replicate journal data from the
> master to the slave, then replay the journal on the slave?

That's about the size of it.

> This looks
> like a lot of work for something that looks like it could be
> implemented by a linked list in the kernel (to achieve aynchronous
> operation).

I don't know about that...

> The DCM looks like an alternative to the above "transactional" method
> of replication - it looks like instead of asynchronously replaying the
> transaction log, you constantly replicate the DCM to the slave (or at
> least the changed bits), and then the slave asks the server to send the
> blocks corresponding to what's marked as changed in the DCM, right?

The DCM only gets used during initial synchronisation, or when the  
outstanding transactions have overflowed the log (which is a bad  
thing), so the DCM gets little used, and only when the slave is  
inconsistent.

> Regarding swapping the master/slave roles: I think you need a fsck step
> somewhere in there, or the same tricks gjournal uses (hooks into UFS)
> since the file system will be marked dirty if you suddenly stop using
> it. Also, to manually force the failover, the master needs to umount
> the file system, probably with "-f". Will it work?

I would agree with all that. I haven't looked into the UFS hooks used  
by gjournal in any depth, so will investigate more.

> Of course, if you think the things you proposed will solve reliable
> replication of data across the network, go ahead :) But since
> ggate+gmirror has already tried to solve this, maybe you'd be
> interested in increasing their reliability, as an exercise before
> trying something from scratch?

I certainly agree that there's no point in reinventing the wheel,  
however I don't see how gmirror, without major changes, can work in a  
way that can cope with a disconnected network and maintain data  
consistency when the network is reconnected.

As a result of your comments I've added some more details to the  
original article.

-- 
Hywel Mallett



More information about the freebsd-geom mailing list