[DRBD-user] 2nd try of reducing size...

Arnold Krille arnold at arnoldarts.de
Mon May 28 20:19:28 CEST 2012

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 28 May 2012 18:53:17 Christian Völker wrote:
> Hi all,
> as I was (lucky!) able to recover from my firt failed attempt I'll give
> it now a second try.
> I have drbd 8.3 running on top of LVM.
> I have already reduced the filesystem (ext3) size on the drbd0 device as
> well as the drbd0 device itself (I suppose I have ;-)). My last attempt
> to reduce the LVM backing device ended up in I/O errors for drbd :(
> So as I said I've already reduced the drbd (with the reduce command) and
> it's running fine:
> [root at drbd ~]# cat /proc/drbd
> version: 8.3.12 (api:88/proto:86-96)
> GIT-hash: e2a8ef4656be026bbae540305fcb998a5991090f build by
> dag at Build64R6, 2011-11-20 10:57:03
>  0: cs:Connected ro:Secondary/Primary ds:UpToDate/UpToDate A r-----
>     ns:0 nr:2147352908 dw:2147352908 dr:0 al:0 bm:131064 lo:0 pe:0 ua:0
> ap:0 ep:1 wo:d oos:0
> And the filesystem is at a smaller size, too. The e2fsck (including bad
> blocks check) runs fine without errors.
> So I assume everything here is everything fine so far and I should able
> to reduce the backing device, shouldn't I?

Should be as far as I can tell from the distance. Be sure to include the 
metadata-overhead in your resize-calculations. And make sure the backup is 

> How does LVM know which blocks to free upon reduce? In other words how
> does LVM know which blocks are not in use by drbd?

lvm reduces from the end. But thats okay, everyone acts that way: resize2fs 
shrinks from the end, drbd-resize shrinks from the end.

To be save you should always reduce to a bit smaller size then the next level. 
Something like fs: 100MB, drbd (including meta-data) 150MB, then reduce lvm to 
160M. When all went well, resize the drbd back to max (which is smaller then 
before everything) and then resize the fs back to max.

Good luck,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20120528/911c2f45/attachment.pgp>

More information about the drbd-user mailing list