[dm-devel] [RFC] dm snapshot based asynchronous replication

christophe.varoqui at free.fr christophe.varoqui at free.fr
Wed Apr 15 18:31:44 UTC 2009


> Should I understand there's no way for userspace to extract from the device mapper the cow'ed chunk list of a vanilla snapshot ?

Replying to myself, I found an instructive post from Lars of the drdb folks : http://markmail.org/message/7qdbp36tohasojuy (thanks for sharing Lars)

This script is easy enough to morph from its original snapshot reverting purpose to the replication model using the cow device as a changelog I described.

Thanks for the inputs. I'll keep posting if I something of general interest comes out of this stuff.


PS:
example per-chunk dump/load dd generated by the script :

root at tstparunx1:/$ /tmp/exceptions.pl  /dev/mapper/tstservcva-snap0-cow
# found snapshot header for chunk_size=8 sectors
# dump: dd if=$lastsnap of=$replayfile seek=125 iflag=direct count=1 bs=8b
# load: dd if=$replayfile of=$replica skip=0 seek=125 iflag=direct count=1 bs=8b
# dump: dd if=$lastsnap of=$replayfile seek=1250 iflag=direct count=1 bs=8b
# load: dd if=$replayfile of=$replica skip=1 seek=1250 iflag=direct count=1 bs=8b
# dump: dd if=$lastsnap of=$replayfile seek=50 iflag=direct count=2 bs=8b
# load: dd if=$replayfile of=$replica skip=2 seek=50 iflag=direct count=2 bs=8b
# dump: dd if=$lastsnap of=$replayfile seek=151 iflag=direct count=1 bs=8b
# load: dd if=$replayfile of=$replica skip=4 seek=151 iflag=direct count=1 bs=8b
# dump: dd if=$lastsnap of=$replayfile seek=126 iflag=direct count=1 bs=8b
# load: dd if=$replayfile of=$replica skip=5 seek=126 iflag=direct count=1 bs=8b
# found 6 exceptions (24 kB)
## use these dd commands AT YOUR OWN RISK




More information about the dm-devel mailing list