AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only

LVM: Compute for a disk from disk size and partition size the total pp

  • 1.  LVM: Compute for a disk from disk size and partition size the total pp

    Posted Tue January 31, 2012 06:27 AM

    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.

    1. 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