[DRBD-user] DRBD and LVM Snapshots

Adam Goryachev mailinglists at websitemanagers.com.au
Wed May 17 01:39:29 CEST 2017


On 15/05/17 02:11, Michael Hierweck wrote:
> Hi all,
>
> up to now to use LVM (thick) provisioning to provide virtual disks for
> VMs: RAID => LVM => LV => DRBD => KVM/QEMU (virtio).
>
> We would like to be able to take snapshots from our virtual disks in
> order to be able to use them as readonly source to consistent backups.
> Therefore we would need to introduce a LVM thin provisioning layer
> somewhere.
>
> A. TP below DRBD
> RAID => LVM => LVM-TP => LV => DRBD => KVM/QEMU (virtio)
>
> - simple setup
> - I suppose going back to an older snapshost would this break DRBD and
> require a complete resync/verify run

This is what I do. When I need to restore a snapshot, I have done the 
following:
dd from the snapshot to a temp file elsewhere (or increase the snapshot 
size to be larger than the original disk image)
dd from the temp file to the DRBD device, we expect to get a write 
error/run out of space at the end, because we can't write the DRBD 
portion at the end of the drive.

I haven't attempted it, and it would be interesting to hear the required 
process to simply use LVM to rollback to the snapshot, but suspect the 
following steps are needed:
1) Stop the DRBD device (both primary and secondary)
2) rollback the LV using LVM tools
3) Start the DRBD device on the primary only
4) Re-initialise the DRBD device on the secondary
5) Start the DRBD device on the secondary

Comments?

Personally, that method doesn't work for me, since I can't "stop" the 
DRBD device because it is constantly open (exported via iscsi)
> B. TP on top of DRBD
> RAID => LVM => LV => DRBD => LVM => LVM-TP => LV => KVM/QEMU (virtio)
> - complex setup
> - more layers affect reliability and performance
> - snapshots are replicated and consistent
> - additional diskspace for snaphosts is limited by the DRBD volume size
> an connot be shared across volumes.
>
>
> I would like to discuss the pros and the cons of both approaches while
> considering internal vs. external metadata.





-- 
Adam Goryachev Website Managers www.websitemanagers.com.au


More information about the drbd-user mailing list