[DRBD-user] Extracting Partition from DRBD Logical Volume

Simon Ironside sironside at caffetine.org
Wed Mar 19 21:26:12 CET 2014

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


On 19/03/14 19:59, Aaron Clausen wrote:

> I would like the ability to grab an LVM image of a guest partition for
> backup, but want to do so without the metadata (in case I need to
> restore the guest on a stand-alone server without DRBD). Is there a
> way via dd or some other tool to extract just the virtual drive and
> not DRBD's metadata?

My solution is not to worry about it. The DRBD metadata is at the end of 
the LV so its presence will do no harm at all should you wish to restore 
it to a server without DRBD and boot your VM directly off the LV.

If it really bothers you, you could limit dd to copy only the size of 
the DRBD partition rather than the whole LVM LV. You can get the size of 
the DRBD partition in bytes using something like:

blockdev --getsize64 <drbd_device>

It will be a little bit smaller than the backing device.

HTH,
Simon




More information about the drbd-user mailing list