File system replication between servers

Dan Nelson dnelson at allantgroup.com
Sat Sep 4 18:58:22 PDT 2004


In the last episode (Sep 04), Marc G. Fournier said:
> Does anyone know of any software that will run on FreeBSD that would
> allow you to keep two servers in sync?  All writes to /dir1 on
> server1 would go to /dir1 on server2, and all writes to /dir2 on
> server2 would go to /dir2 on server1?
> 
> I've thought about rsync, but am trying to get it as close to real
> time as I can, and on large file systems, rsync would just get too
> far behind, too quickly ...
> 
> I've started to look at Coda6, but so far what I'm reading through
> the docs makes it sound like it may not be suitable ...
> 
> What I'm looking for is a hot failover solution using FreeBSD ... if
> server1 goes down, server2 can start up and continue working ... when
> server1 comes back up again, changes to server2 could be re-sync'd
> back to server1, and server1 could once more resume its duties ...

How about a shared SCSI drive, filesystems only mounted on the master. 
When the master fails, the slave fscks the filesystems, mounts them,
and becomes the master.  Tried and true.  You could even use background
fsck and get immediate failover.

You could even do it without shared storage if you use geom_gate and
geom_{mirror,vinum,ccd} to keep two identical disks on each machine in
sync. When the master crashes and comes back up as a slave, the mirror
code will update its disks.

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-questions mailing list