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

Amos Shapira amos.shapira at gmail.com
Mon Dec 10 13:38:16 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.


Hello,

I have a couple of CentOS 5 machines running DRBD 8.0.6 between them -
drbd01 and drbd02.

The DRBD partition occupies an LVM of its own and the meta data is a
flexible one on another patition.

Everything worked great until I tried to learn how to shrink the
partition. On the ext3 and LVM side things worked well (using e2resize
and lvreduce) but I couldn't find a way to somehow tell DRBD about the
new partition size.

I found about "drbdadm resize" but it doesn't seem to make any effect on drbd.

Currently (after numerous attempts at various commands) the status of
drbd is as follows:

 [root at drbd01 etc]# cat /proc/drbd
version: 8.0.6 (api:86/proto:86)
SVN Revision: 3048 build by buildsvn at c5-x8664-build, 2007-10-25 06:25:16

 1: cs:WFConnection st:Secondary/Unknown ds:Inconsistent/DUnknown C r---
    ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0
        resync: used:0/31 hits:0 misses:0 starving:0 dirty:0 changed:0
        act_log: used:0/127 hits:0 misses:0 starving:0 dirty:0 changed:0

[root at drbd02 ~]# cat /proc/drbd
version: 8.0.6 (api:86/proto:86)
SVN Revision: 3048 build by buildsvn at c5-x8664-build, 2007-10-25 06:25:16

 1: cs:WFConnection st:Secondary/Unknown ds:Inconsistent/Outdated C r---
    ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0
        resync: used:0/31 hits:0 misses:0 starving:0 dirty:0 changed:0
        act_log: used:0/127 hits:0 misses:0 starving:0 dirty:0 changed:0

Is this the way to go? I couldn't find instructions on what exactly
should be done anywhere.

Thanks,

--Amos



More information about the drbd-user mailing list