From mboxrd@z Thu Jan 1 00:00:00 1970 From: christophe.varoqui@free.fr Subject: Re: [RFC] dm snapshot based asynchronous replication Date: Wed, 15 Apr 2009 20:31:44 +0200 (CEST) Message-ID: <1046537454.2150461239820304817.JavaMail.root@zimbra16-e3.priv.proxad.net> References: <137413921.2150341239820262767.JavaMail.root@zimbra16-e3.priv.proxad.net> Reply-To: device-mapper development Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <137413921.2150341239820262767.JavaMail.root@zimbra16-e3.priv.proxad.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: device-mapper development Cc: lars.ellenberg@linbit.com List-Id: dm-devel.ids > 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@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