mpalmer / lvmsync

Synchronise LVM LVs across a network by sending only snapshotted changes

Home Page:http://theshed.hezmatt.org/lvmsync

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Typo in Readme

ahinrichs opened this issue · comments

When I understand the logic right, then there is a typo in the example script. The pre sync should sync the snapshot view to the new host. If I'm right, the line should read:

dd if=/dev/vmsrv1/somevm-lvmsync bs=1M | pv -ptrb | ssh root@vmsrv2 dd of=/dev/vmsrv2/somevm

(not if=/dev/vmsrv1/somevm). Even if I think in the end it doesn't matter, but for me it would make the example more meaningful.

Good idea behind this, btw.

As best as I can tell ahinrichs is right that the README's instruction to dd the source volume would result in an inconsistent image once transferred-- and goes against the recommended lvm snapshot backup practice talked about elsewhere on the web.

I suspect that since any block that was changed during the original dd will be overwritten with the final correct data by the lvmsync process it doesn't matter.

I would still love to here someone who is more familiar with lvm snapshot operation report in.

commented

If you ask someone who is more familiar with lvm snapshot, I can tell you that ahinrichs and the guy in #4 is correct.

The infile for the dd must be the snapshot /dev/vmsrv1/somevm-lvmsync, because that one contains the consistent state. Transferring the life LV probably works as well (if I get lvmsync right), but the example causes more confusion then it makes something clear.

Either create a snapshot, then use it for dd. Or leave the creation of the snapshot out of the example.

It's irrelevant which volume -- the origin or the snapshot -- you transfer initially. If you sync the snapshot, you get all the original data. If you sync the origin, you'll get unchanged data plus the data that you're going to overwrite again later during the lvmsync run.

I sync the origin because having the contents of the origin in the disk cache is more useful than having the snapshot in the cache.