[DRBD-user] Can't shrink backing block device offline
Robert Altnoeder
robert.altnoeder at linbit.com
Wed Jul 21 16:59:52 CEST 2021
On 7/16/21 10:53 AM, Christophorus Reyhan wrote:
> I appologize, I seem to made a big miscalculation on the size to
> sectors, I think I should've divide size in Bytes (instead of KiB)
> with 512 Bytes to get the sectors.
> So the correct calculation (if what I'm understanding is right) is this:
>
> 1.5 TiB = 1,610,612,736 KiB
> 1,610,612,736 KiB = 1,649,267,441,664 Bytes
> 1,649,267,441,664 Bytes / 512 bytes = 3,221,225,472 Sectors
> Snet= 1,610,612,736 KiB - ((3,221,225,472 Sectors/32768 * 5 peers) +
> 1024KiB)
> Snet= 1,610,612,736 KiB - (491,520 Sectors + 1024 KiB)
> Snet= 1,610,612,736 KiB - (245,760 KiB + 1024 KiB)
> Snet= 1,610,612,736 KiB - 246,784 KiB
> Snet= 1,610,365,952 KiB = 1,608,793,329 MiB
>
> Is this correct?
For a gross device size of 1,610,612,736 kiB (1,536 GiB), your available
net size is 1,610,366,940 kiB, so since your calculation yielded a
somewhat smaller net size, it would have been sufficiently accurate to
enable creation of the DRBD meta data in the empty space behind the file
system.
Here are the calculation results from the algorithms also used in LINSTOR:
Calculation results
***
Peers: 5
Activity log size: 32 kiB ( 64 sectors)
Activitiy log stripes: 1
***
Net size: 1610366940 kiB ( 3220733880 sectors)
(~ 1.50 TiB)
Gross size: 1610612736 kiB ( 3221225472 sectors)
(~ 1.50 TiB)
Effective meta data size: 245796 kiB ( 491592 sectors)
(~ 240.04 MiB)
Unless I mistyped something, these results should be accurate.
br,
Robert
More information about the drbd-user
mailing list