Originally posted by: LucienS
Hallo everyone
I am developing a tool to manage lvm volumes of a machine.
For this tool I have to compute the total physical partition from the volume group partition size and from the disk size, before adding this disk (physical volume) to the volume group.
-
getconf DISK_SIZE /dev/hdisk11
131076
lsvg testvg
PP SIZE: 32
If I calculate 131076MB /32MB I get 4096 physical partitions, but this calculation isn't correct because of the overhead.
The correct number would be 4093 physical partitions.
The overhead, change also with the physical partition size
131076MB/64MB = 2048 physical partitions, correct would be 2046
131076MB/256MB = 512 physical partitions, correct would be 511
Does some one know how to calculate this correct.
Thanks
Lucien