[DRBD-user] how to shrink a DRBD partition?

Florian Haas florian.haas at linbit.com
Mon Dec 10 14:21:39 CET 2007

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


On Monday 10 December 2007 13:38:16 Amos Shapira wrote:
> I found about "drbdadm resize" but it doesn't seem to make any effect on
> drbd.

"drbdadm resize" should really be renamed "drbdadm enlarge" or "drbdadm 
extend"; it doesn't reduce.

Your recommended approach for shrinking a DRBD device is this:
1. drbdadm down <resource> (on both nodes)
2. Shrink filesystem on underlying volume (on one node)
3. Shrink LV's (on both nodes)
4. Re-create DRBD meta data, drbdadm create-md <resource> (both nodes)
5. drbdadm up <resource> (both nodes)
6. drbdadm -- --overwrite-data-of-peer primary <resource> (on node where you 
shrunk the file system)

Hope this helps.

Cheers,
Florian

-- 
: Florian G. Haas
: LINBIT Information Technologies GmbH
: Vivenotgasse 48, A-1120 Vienna, Austria



More information about the drbd-user mailing list