I used formula from http://www.exonotes.com/node/74 to calculate md_size_sect and la-sect-size then compare it to md_size_sect given by create-md after shrinking the volume, and it’s different (because it doesn’t account for max-peers I assume?). la-size-sect = device_size_in_sectors – md_size_sect where md_size_sect = int((device_size_in_sectors / 32768 + 79)/8)*8 >Either resize your filesystem to 179M, resize the LV to 180M, and then after everything is working again, you can resize the filesystem to take all available space, and it should increase to 184252kB or 179.9+ MB
So without using all that formula you just mention, and formula provided in the source above, generally using : Filesystem size = total backing block device size (MB) - 1 Should work just fine right (I tested it and it works)? >For practical purposes, it’s normally sufficient to calculate Sgross / 32768 * Cpeer + 1 MiB. So you’re basically making the device too large (or the filesystem too small), that way you end up with a bit more space for the meta data than what you actually need. That is also what is documented in the DRBD User’s Guide. But if its in GB/TB, it’s sufficient to use Sgross / 32768 * Cpeer + 1 MiB ? For example: I have 1.5 TB LVM with sector size of 512bytes, so 1.5 TiB = 1,610,612,736 KiB 1,610,612,736 KiB / 512bytes = 3145728 Sectors Snet= 1,610,612,736 KiB - ((3145728 Sectors/32768 * 5 peers) + 1024KiB) Snet= 1,610,612,736 KiB - (480 Sectors + 1024 KiB) Snet= 1,610,612,736 KiB - (240 KiB + 1024 KiB) Snet= 1,610,612,736 KiB – 1,264KiB Snet= 1,610,611,472KiB So I set the filesystem to 1610612256 KiB and backing block device to 1610612736 KiB. Am I in the right path here? |
_______________________________________________ Star us on GITHUB: https://github.com/LINBIT drbd-user mailing list drbd-user@lists.linbit.com https://lists.linbit.com/mailman/listinfo/drbd-user