some thoughts about gmirror

Eric Anderson anderson at freebsd.org
Mon Apr 9 14:25:20 UTC 2007


On 04/06/07 18:48, Mike Wolman wrote:
> Hi,
> 
> Currently I am using gmirror and ggated to run a live network mirror. 
> Obviously this can cause problems if the server exporting the 'backup' 
> device is offline then the mirror is broken - when the machines reconnect 
> a full mirror sync takes place.  This is fine over gbit crossover and if 
> the size of the mirror is only a few 100Gb.
> 
> Is it feasible that when the connection to one of the mirror devices
> breaks gmirror starts to log the changes to the mirror (obviously you
> would need to configure up this mirror device as a 'lazy' mirror member
> with a spare local device to write the changes to) - when the machines
> reconnect gmirror would only then have to sync the actual changes.
> 
> This is sort of achieves a similar result to Live Network Backup on NetBSD 
> (http://kerneltrap.org/node/5058).
> 
> It could be used for laptop users mirroring their whole drive, allowing a 
> fast sync when they are on their local lan and should the laptop get lost 
> it would be possible to restore the whole machine with a simple dd.  If 
> they were using a usb key as the device to log the changes while they were 
> disconnected from the network and they remember to unplug/plug this each 
> time they use the laptop then it could even be possible to recover the 
> data to the point they actually lost the machine.
> 
> It could also be used for asynchronous mirrors over slow links, if the log 
> device was always written to first then the write latency for long distant 
> links could be removed.  Im not sure if it would be possible to achieve 
> this using just a modified ggatec instead which has a local device used 
> as a write cache.


Personally, I think this would be a very useful feature.  This is sort 
of like snapshots for GEOM, which would be useful in other ways too. 
GEOM journaling, GEOM snapshots, and this lazy mirroring are all 
somewhat similar it seems.

Are you proposing to write such a feature?  Even if you can't code it, 
writing up the design/specs might help someone actually implement it.


Eric


More information about the freebsd-fs mailing list