[DRBD-user] Stacking an existing DRBD device

Christoph Mitasch cmitasch at thomas-krenn.com
Wed Jul 9 13:22:10 CEST 2014

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


I'm currently experimenting with DRBD stacking with a third node.
The goal is to keep the current data on the existing DRBD device.

The initial situation is a two node Pacemaker cluster:
* /dev/drbd1 backed by /dev/sda3 with internal meta data
* LVM on top of /dev/drbd1
# pvs
  PV          VG       Fmt  Attr PSize PFree
  /dev/drbd1  vg_node1 lvm2 a-   3.30g 2.00g

I'm now adding the third node:
* resizing PV (assuming 300MB should be more than enough for meta data)
# pvresize --setphysicalvolumesize 3G /dev/drbd1
* configuring stacked DRBD device /dev/drbd10
* creating metadata on stacked device
# drbdadm --stacked create-md r1-U

Extract from man pvresize:
"pvresize will refuse to shrink PhysicalVolume if it has allocated extents after where its new end would be."

What do you think, should that procedure work without destroying any data?

Thank you,

PS: The following posting can help to understand the procedure:

More information about the drbd-user mailing list