There are a number of different ways to determine the size of a physical volume (disk, LUN) under AIX.
If you have root privileges, you can use the bootinfo command with the “-s” (size) option:
# bootinfo -s hdisk0 51200 #
The size of the physical volume is given in MB. In the example 51,200 MB or about 50 GB.
Without root privileges, the getconf command can be used. With this command, system-wide configuration parameters as well as device-specific variables can be displayed. The device-specific variable DISK_SIZE can be used to display the size of a physical volume. The physical volume in question is specified by the absolute path of the physical volume’s block or character device file:
$ getconf DISK_SIZE /dev/hdisk0 51200 $
Here, too, the size is given in MB.
Another option, which again requires root privileges, is to use the lsmpio command. The command offers the option “-q” (query) to display data about an MPIO storage device:
# lsmpio -ql hdisk0 Device: hdisk0 … Capacity: 50.00GiB … #
The size is directly displayed in GB (GiB) this time.
If the physical volume is part of a volume group, the lspv command can also be used to at least estimate the size:
$ lspv hdisk0 … TOTAL PPs: 199 (50944 megabytes) VG DESCRIPTORS: 2 … $
The area that can be used for data is specified here (50,944 MB), the physical volume itself is somewhat larger, since space is also used for administrative information.