<div dir="ltr">Not an expert, so don&#39;t get my words for granted. You can calculate estimated metadata size by using the formula described in chapter &quot;16.1.3. Estimating meta data size&quot; in the drbd user guide.<br><br>To check the current space (in sectors) allocated for metadata, subtract the total disk size in sectors (assuming you are using /dev/vdb as the drbd backing device, and not LVM on top of it) with current la-size-sect (2306867200 - 2306796728=70472).You can then multiply the result with 512 to get the size in bytes (70472 x 512=36081664 Bytes or ~34.4Mbytes).<br><br>Since you are about to increase the vdisk size to 2TB (double its current size), a safe guess would be to use the double size of the current metadata allocation as well  (70472 x 2).<br><br>You could take a snapshot of the VM before doing any changes just in case something goes wrong. Even better, try reproducing your current setup on two new VMs (disk sizes can be smaller) and test the above steps over there, before applying them to the production VMs.<br><br>Good luck<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 29 Nov 2021 at 05:59, Christian Völker &lt;<a href="mailto:knebb@knebb.de">knebb@knebb.de</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  

    
  
  <div>
    Hi list,<br>
    <br>
    I realized I am using drbd now for more than ten years and is has
    been a joy all the time.<br>
    <br>
    Now I have a request where I am really unsure how to deal with.<br>
    <br>
    I have to resize a volume offline. Mainly because the carppy
    hypervisor does not allow to enalrge virtual disks while the vm ist
    running.....<br>
    <br>
    I checked the <a href="https://linbit.com/drbd-user-guide/drbd-guide-9_0-en/#s-growing-offline" target="_blank">docs</a>
    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?<br>
    <br>
    I tried to firgure out and match the current size with the current
    volume but there is a mismatch:<br>
    ===========================================<br>
    root@drbd1:~# grep la-size metatada.drbd1<br>
    la-size-sect 2306796728;<br>
    root@backuppc41:~# fdisk -l /dev/vdb<br>
    Disk /dev/vdb: 1,07 TiB, 1181116006400 bytes, 2306867200 sectors<br>
    Units: sectors of 1 * 512 = 512 bytes<br>
    Sector size (logical/physical): 512 bytes / 512 bytes<br>
    I/O size (minimum/optimal): 512 bytes / 512 bytes<br>
    ===========================================<br>
    <br>
    So from where do I get the number of sectors (after having enlarged
    the disk)?<br>
    Are there any other pitfalls?<br>
    <br>
    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? <br>
    So this won&#39;t work?<br>
    -drbdadm down<br>
    -shut down VM<br>
    -enlarge disk<br>
    -power on VM<br>
    -start drbd realizing there is a new size ...<br>
    <br>
    However, any clue for the main question about how to get the
    sectors?<br>
    <br>
    <br>
    Thanks a lot!<br>
    <br>
    /Christian<br>
  </div>
_______________________________________________<br>
Star us on GITHUB: <a href="https://github.com/LINBIT" rel="noreferrer" target="_blank">https://github.com/LINBIT</a><br>
drbd-user mailing list<br>
<a href="mailto:drbd-user@lists.linbit.com" target="_blank">drbd-user@lists.linbit.com</a><br>
<a href="https://lists.linbit.com/mailman/listinfo/drbd-user" rel="noreferrer" target="_blank">https://lists.linbit.com/mailman/listinfo/drbd-user</a><br>
</blockquote></div>