bootinfo -s hdiskx
getconf 'DISK_SIZE' /dev/hdiskX也可以