If your AIX environment has disks of different sizes it can be difficult to keep track of just how big each one is. Of course, you can use the lspv command, but only for the Physical Volumes (disks) that are members of active Volume Groups (VGs). If you want to check the size of a disk even if it's not in a VG, use the getconf command.
To see how big a disk is, enter getconf DISK_SIZE followed by the disk name with its path (/dev/hdiskN). The size is reported in megabytes.
getconf DISK_SIZE /dev/hdisk2
51200
In this example, hdisk2 is 51200 MB, or 50 GB.
(If you've been around the AIX world for a while, you may remember using the command bootinfo -s to find a disk size. The bootinfo command has been deprecated in favor of getconf.)
You can use getconf whether the disk is physical (such as a directly attached SAS disk), or virtual, such as a SAN LUN or a Virtual SCSI disk backed by a logical volume or a file on the Virtual I/O Server (VIOS).
The VIOS lspv -size command
Speaking of the VIOS, you can check disk sizes on the VIOS command line quite easily with the lspv command. Log into the VIOS as padmin. This takes you into the Restricted Korn shell. From there you can run the command lspv -size, and specify the disk name.
Unlike the equivalent lspv command in AIX, the VIOS reports the size of the disk, whether or not the disk belongs to a volume group. To report the sizes of all VIOS disks, you can use lspv -size without specifying a disk name.
Resources
Use the getconf command to display system configuration variable values
http://publib.boulder.ibm.com/infocenter/aix/v7r1/topic/com.ibm.aix.cmds/doc/aixcmds2/getconf.htm
Use getconf instead of bootinfo
https://www-304.ibm.com/support/docview.wss?uid=isg3T1010828
The AIX lspv command lists information about a physical volume within a volume group
http://publib.boulder.ibm.com/infocenter/aix/v7r1/topic/com.ibm.aix.cmds/doc/aixcmds3/lspv.htm
The VIOS lspv command has a -size flag
http://publib.boulder.ibm.com/infocenter/powersys/v3r1m5/index.jsp?topic=/iphcg/lspv.htm
Anthony English is an AIX / Power Systems engineer working in Sydney. Follow him on Twitter @AIXDownUnder.
Anthony English is an AIX / Power Systems engineer working in Sydney. Follow him on Twitter @AIXDownUnder.
|
|
|
|
Anthony English is an AIX / Power Systems engineer working in Sydney. Follow him on Twitter @AIXDownUnder.
|
|
|
|