[DRBD-user] Resize offline - Questions

Christian Völker knebb at knebb.de
Thu Nov 25 17:04:30 CET 2021

Hi list,

I realized I am using drbd now for more than ten years and is has been a 
joy all the time.

Now I have a request where I am really unsure how to deal with.

I have to resize a volume offline. Mainly because the carppy hypervisor 
does not allow to enalrge virtual disks while the vm ist running.....

I checked the docs 
about offline resize. There are some questions remaining. It states I 
have to edit the metadata file I created to match the sectors of the new 
size. My question now is: where do I get this number from?

I tried to firgure out and match the current size with the current 
volume but there is a mismatch:
root at drbd1:~# grep la-size metatada.drbd1
la-size-sect 2306796728;
root at backuppc41:~# fdisk -l /dev/vdb
Disk /dev/vdb: 1,07 TiB, 1181116006400 bytes, 2306867200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

So from where do I get the number of sectors (after having enlarged the 
Are there any other pitfalls?

Just to really make sure: There is no easier way to do? I mean how does 
drbd recon the new size of the disk when online?
So this won't work?
-drbdadm down
-shut down VM
-enlarge disk
-power on VM
-start drbd realizing there is a new size ...

However, any clue for the main question about how to get the sectors?

Thanks a lot!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20211125/ca04f561/attachment.htm>

More information about the drbd-user mailing list