[DRBD-user] How do I reconfigure a device

Lars Ellenberg Lars.Ellenberg at linbit.com
Mon Nov 7 11:50:59 CET 2005

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


/ 2005-11-07 16:05:34 +1300
\ Jeremy Bowen:
> Hi 
> 
> I've been playing around with DRBD v0.7.14 and have got everything working OK.
> 
> I'm now trying to start putting my system into production and I want to resize 
> one of my /dev/drbdX partitions. (I'm attempting this stand-alone and have 
> not connected the disk to another drbd device)
> 
> I've attempted to resize with the following commands (in all possible 
> combinations!!):
> /sbin/drbdsetup /dev/drbd0 disconnect
> /sbin/drbdsetup /dev/drbd0 down
> /sbin/drbdsetup /dev/drbd0 detach
> /sbin/drbdsetup /dev/drbd0 disk /dev/sda5 /dev/sda6 0 -d 62661501
> 
> but this fails with an entry in the dmesg:
> drbd0: Requested disk size is too big (62661501 > 59000)
> 
> I've also tried:
> /sbin/drbdsetup /dev/drbd0 resize -d 62661501
> but this results in the same dmesg entry as above.

if we have seen our peer, we remember the "last agreed" size.
you are not allowed to grow beyond that in stand alone, at least not
using these tools.

you should have one of them primary, have them connected,
then drbdadm resize. that would be intended usage.
they still can only agree on the minimum of the device
sizes of the peers, so you have to first resize both lower level
partitions, then the drbd, and then the fs.

> If I do a:
> /sbin/drbdsetup /dev/drbd0 show 
> I get the following
> 
> Lower device: 08:05   (sda5)
> Meta device: 08:06   (sda6)
> Meta index: 0
> Disk options:
>  size = 62661501 KB

> However filesystem operations fail and the volume eg:
> /sbin/mke2fs -j /dev/drbd0
> mke2fs 1.35 (28-Feb-2004)
> /dev/drbd0: Read-only file system while setting up superblock

to mkfs or resizefs or anything like that, drbd need to be primary.

-- 
: 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