Skip to contentSkip to conversation

dm snapshot based asynchronous replication

RFC [email protected] 3 participants 4 messages Apr 13, 2009 – Apr 14, 2009 1 message not in the archive Device mapper

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

dm developers,

I'm in need of an asynchronous replication method for active/passive clusters using direct-attached disks. Please advise if you know tools (other than drdb an rsync) to do the job. (How goes dm-replicator btw ?).

Pending an existing project, I toyed with a replication scheme I'd like to sketch here for comments and fool-proofing.

Source and destination are logical volumes : lv_src => lv_dst Upon cold start lv_src and lv_dst are unsynchronized.

==== pseudo-code start
snap lv_src (lv_src_snap0)
full copy lv_src_snap0 on lv_dst
while true:
wait n seconds
snap lv_src (lv_src_snap1)
for each changed chunk in lv_src_snap0 cow table:
copy chunk from lv_src_snap1 to lv_dst
drop lv_src_snap0, and rename lv_src_snap1 to lv_src_snap0
==== pseudo-code end

Snapshoting the lv_dst would make sense as a rollback safety net ... even if the rollback is a bit hard pending the snapshot merging patchset inclusion.

If this sketch looks sane to you, I'm interested in how to list the changed chunks for a snap. A pointer to existing code would do great.

Regards,
cvaroqui

#2 lore raw
Quoted 3 lines · On Mon, 13 Apr 2009 23:08:20 +0200 (CEST) [email protected] wrote:

dm developers,

I'm in need of an asynchronous replication method for active/passive clusters using direct-attached disks. Please advise if you know tools (other than drdb an rsync) to do the job. (How goes dm-replicator btw ?).

Zumastor?

http://zumastor.org/

An asynchronous remote replication based on snapshots is one of reasons why I worked a new dm snapshot implementation:

https://www.redhat.com/archives/dm-devel/2008-August/msg00003.html

Jonathan Brassow has been working on it (Jonathan, Thanks!):

http://marc.info/?l=dm-devel&m=123905441719141&w=2

If you add the interface to get the delta between two snapshots, then you can implement a daemon in user space that does an asynchronous remote replication.

#3 lore raw
Quoted 17 lines · FUJITA Tomonori
Quoted 3 lines · On Mon, 13 Apr 2009 23:08:20 +0200 (CEST) [email protected] wrote:

dm developers,

I'm in need of an asynchronous replication method for active/passive clusters using direct-attached disks. Please advise if you know tools (other than drdb an rsync) to do the job. (How goes dm-replicator btw ?).

Zumastor?

http://zumastor.org/

An asynchronous remote replication based on snapshots is one of reasons why I worked a new dm snapshot implementation:

https://www.redhat.com/archives/dm-devel/2008-August/msg00003.html

Quoted 7 lines

Jonathan Brassow has been working on it (Jonathan, Thanks!):

http://marc.info/?l=dm-devel&m=123905441719141&w=2

If you add the interface to get the delta between two snapshots, then you can implement a daemon in user space that does an asynchronous remote replication.

The exception store API is waiting for agk to push upstream. The 'shared' (aka tomonori/phillips) exception store module is working and ready for testing. I am working on the LVM patches to allow people to use the shared exception store, but this will take me a while. (The cluster-aware exception store is ready for testing as well.)

Regarding the solution you are talking about... I'm not sure how you will get the information out about the deltas between the snapshots. One method I see working would be to use device-mapper's 'message' and 'wait/status' interface. The API already has the ability to pass on messages to the exception stores below, which are free to implement their own features. Still, it would be nice if there was a cleaner way to do this....

Of course, this dialog assumes you've hit upon the right solution to your problem. There may be another way... Direct-attached disks is what is complicating the problem. You could use 'rgmanager' if the devices where shared. You could also use a network block device driver (gnbd, etc) and then use mirroring, but this isn't much different than DRBD.

brassow

brassow

#4 lore raw
In reply to FUJITA Tomonori
Quoted 3 lines

Zumastor?

http://zumastor.org/

thanks for your prompt response. zumastor is indeed exactly what I need feature-wize. Thanks for pointing it.

Though I'm eager to play with shared exception snapshots, my more pressing need will need to run on unmodified redhat el5. Thus I'm tied to vanilla snapshots, but that could be sufficient for my simplistic replication algorithm if I find a way to list cow'ed chunks : no need for snap-deltas, I'm ok with replicating more data than necessary (that can't be worse a ressource drain than rsync on big vm files).

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