Sunday, July 19, 2009

Storage Mapping from HMC and VIOS

From HMC:
lshwres -r virtualio --rsubtype scsi -m Server-8203-E4A-SN064FA22 -F

lpar name and id -- virtual disk, slot and adapter id.

From VIOS:

1. To know hard disk of each LPAR:
i/p: slot id and adapter id
o/p: backing device name -- this may be hard disk or logical volume

if it is logical volume: (say lpar1)

$ lslv -pv lpar1
lpar1:N/A
PV COPIES IN BAND DISTRIBUTION
hdisk1 280:000:000 38% 000:109:109:062:000

From this get Hard Disk-- hdisk1


2. To know storage space (Capicity) of each LPAR

From virtual disk: (e.g virtual disk- hdisk1)



a). Get: Lpar Name and Number of PPs

Run "lspv -lv hdisk1"


$ lspv -lv hdisk1
hdisk1:
LV NAME LPs PPs DISTRIBUTION MOUNT POINT
lpar3 266 266 110..00..00..47..109 N/A
lpar1 280 280 00..109..109..62..00 N/A
$


b). What VG is hdisk1 on ?

$ lspv
NAME PVID VG STATUS
hdisk0 0004fa2212ea9bce rootvg active
hdisk1 0004fa2218b2405c rootvg active
c). From VG get PP SIZE

$ lsvg rootvg | grep 'PP SIZE'
VG STATE: active PP SIZE: 256 megabyte(s)
d). Total space LPAR one is using: Num of PP * PP Size
Capacity=280*256 Mg

3. Total Hard disk: -- Calculate total Size

$ lspv -size
NAME PVID SIZE(megabytes)
hdisk0 0004fa2212de8cec 140013
hdisk1 0004fa2218a6f86b 140013