Show disk size with getconf DISK_SIZE /dev/hdisk0
AnthonyEnglish 270000RKFN Comments (6) Visits (60447)
If you want to get the size of a disk (virtual or physical), you can use the AIX getconf command.
getconf DISK_SIZE /dev/hdisk0
The size is reported in MB, so the disk above is a 140 GB disk.
You could use the bootinfo -s, but that command is
so I'm not even going to give you a link to its man pages.
Maybe you're not exactly sure what "deprecated" means, but it sounds bad, doesn't it? According to Wikipedia, "deprecated" . So don't use bootinfo, OK?
Back to AIX and disk sizes.
To display disk sizes you could, of course, use the AIX lspv command, but that only works if the disk is in a volume group.
If the disk (be it physical or virtual) is on the VIOS, you can display it using the VIOS command lspv -size. Unlike the AIX lspv command, this VIOS command should show the size, even if the disk is not assigned to a volume group on the VIOS.
For more on getconf and the deprecated bootinfo command, see this IBM technote.