[DRBD-user] Unable to resize a block device after it has been shrinked with 0.7.21

Lars Ellenberg Lars.Ellenberg at linbit.com
Wed Sep 20 12:47:56 CEST 2006

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


/ 2006-09-15 23:47:04 +0300
\ Cyril Bouthors:
> I'm able to shrink a DRBD block device:
> 
> root at nfsb3:~# dd if=/dev/zero of=/dev/md0 bs=1M
> dd: writing `/dev/md0': No space left on device
> 2001+0 records in
> 2000+0 records out
> 2097152000 bytes transferred in 80.382527 seconds (26089650 bytes/sec)
> root at nfsb3:~# /etc/init.d/drbd start
> Starting DRBD resources:    [ d0 s0 n0 ].
> root at nfsb3:~# drbdsetup /dev/drbd0 resize -d 1500M
> root at nfsb3:~#
> 
> drbd0: Creating state block
> drbd0: resync bitmap: bits=479232 words=14976
> drbd0: size = 1872 MB (1916928 KB)
>               ^^^^^^^
> drbd0: 1916928 KB now marked out-of-sync by on disk bit-map.
> drbd0: Assuming that all blocks are out of sync (aka FullSync)
> drbd0: 1916928 KB now marked out-of-sync by on disk bit-map.
> drbd0: drbdsetup [5104]: cstate Unconfigured --> StandAlone
> drbd0: drbdsetup [5117]: cstate StandAlone --> Unconnected
> drbd0: drbd0_receiver [5118]: cstate Unconnected --> WFConnection
> drbd0: resync bitmap: bits=384000 words=12000
> drbd0: size = 1500 MB (1536000 KB)
>               ^^^^^^^
> drbd0: 1536000 KB now marked out-of-sync by on disk bit-map.
> 
> But I'm not able to resize it up:
> 
> root at nfsb3:~# drbdsetup /dev/drbd0 resize -d 1600M
> root at nfsb3:~#                                ^^^^^
> 
> drbd0: Requested disk size is too big (1638400 > 1536000)
> 
> I don't think it's normal.

it is.
once "resized", we store this as "last agreed" size in meta data,
so you cannot accidentally resize with only one node up (accidentally
grow larger than the available storage on the peer).

that you can resize the first time without the other node being up is
actually more a bug than a feature.
resizing works _only_ if both nodes are up and connected.

(or, because of reasons I forgot, when the "last_agreed" size is zero
peers never saw each other yet). 

if you find other behaviour, that would be non-intentional (read: bug).

-- 
: Lars Ellenberg                                  Tel +43-1-8178292-0  :
: LINBIT Information Technologies GmbH            Fax +43-1-8178292-82 :
: Schoenbrunner Str. 244, A-1120 Vienna/Europe   http://www.linbit.com :
__
please use the "List-Reply" function of your email client.



More information about the drbd-user mailing list