Adding new disk to HPVM : How to ??

Scenario :

The SAN team allocated a new lun to the  HOST (Physical server) where the VM machine is running. And now u need to add that lun to HOST node and then add that disk to Gust node.



And here am going to create a new RAW lvol on VM Host and that Raw lvol used as disk on VM Guest.

A. On HOST Node ( Where the VM machine is running )

Once SAN team allocated the disk to HOST node follow the below steps

#ioscan -fnC disk

#ioscan -eC disk

#inq -sym_wwn |grep -i "lun no"

#pvcreate /dev/disk/rdisk??

#vgcreate /dev/vg_name?? /dev/disk/disk??

#lvcreate -L "disk size in MB" -n /dev/vg_name??/lv_?? /dev/vg_name??

(Create a RAW Lvol only , no need to create a FS, since we are going to allocate this RAW lvol as disk to HPVM)



B. Adding disk to Guest :


# /opt/hpvm/bin/hpvmstatus -P VM_Machine_Name
  // To check the existing disk details for the VM machine


Now we need to add this newly created LVOL to GUEST node as new disk.


#hpvmmodify -P vir_machine -a disk:scsi:lv:/dev/vg_name??/LV_name??
 // New lvol which we created

or 

# hpvmmodify -P vir_machine -a disk:scsi:0,1,7:lv:/dev/vg_name??/rlv_name?? //Mention the controller id


Once added the disk check and confirm

#/opt/hpvm/bin/hpvmstatus -P VM_Machine_Name  //check the storage interface details in o/p


For example we will get like below ,

Device  Adaptor    Bus Dev Ftn Tgt Lun Storage   Device
======= ========== === === === === === ========= =========================
disk    scsi         0   1   0   0   0 lv        /dev/vg_vir_machine_00/rlv_os_00
disk    scsi         0   1   0   1   0 lv        /dev/vg_vir_machine_01/rlv_app_01
disk    scsi         0   1   0   2   0 lv        /dev/vg_vir_machine_02/rlv_app_02
disk    scsi         0   1   0   3   0 lv        /dev/vg_vir_machine_03/rlv_app_03
disk    scsi         0   1   0   4   0 lv        /dev/vg_vir_machine_04/rlv_app_04
disk    scsi         0   1   0   5   0 lv        /dev/vg_vir_machine_05/rlv_app_05
disk    scsi         0   1   0   6   0 lv        /dev/vg_vir_machine_06/rlv_app_06
disk    scsi         0   1   0   7   0 lv        /dev/vg_vir_machine_07/rlv_app_07 ---->>Consider this is new LVOL (disk)



C.Now login to the Guest node ( Virtual machine)


#ioscan  -fnC disk

#ioscan -eC disk

#pvcreate /dev/disk/diskname??  //New disk name

Now you can add this to any VG and then you can create a new lvol or extend the exisiting FS.


QA : How to Find new disk in Guest node:


On HOST -

#hpvmstatus -P vmmachine


[ disk    scsi         0   1   0   7   0 lv        /dev/vg_vir_machine_07/rlv_app_07 ---->>Consider this is new LVOL (disk)  ]

Note down the lvol path - 0   1   0   7   0

ON Guest:

#ioscan -fnC disk

The new disk path will be @ 0/1/7/0 - Check and confirm the same in hpvmstatus -P vmmachine o/p

and then do # ls -lrt /dev/disk or /dev/dsk/ you will get the new disk path directory in recent date.




How to add more than 10 disk to HPVM : Click Here


Post a Comment

0 Comments