Learn how to identify virtual machine disk on the physical host machine in HP iVM. Disk mapping makes it easy to carry out disk related activities.
In HP integrity virtual machines, disk names on the host machines and virtual machines are always different for the same disk. Whenever we are presenting disk (storage LUN or local disk) from host to guest, it will be discovered as a different name on guests than a host. So it becomes necessary to know both names of the same disk for any disk-related activities.
Let see how we can map these two names. There are two methods to do this.
Using xD command
xD command used to read raw data on disk. Since the physical disk is the same on both servers only identification at kernel level differs, we will get the same raw data from both servers. We will use
xD command to get PVID of disks from the host and guest. Whenever there is a match of PVID in both outputs, consider the disk is the same.
See below example where
xD command is used with host and guest disks.
------ On guest ----- vm:root-/>xd -An -j8200 -N16 -tx /dev/disk/disk76 70608a28 4ec7a7ff 70608a28 4ec7a942 vm:root-/>xd -An -j8200 -N16 -tx /dev/disk/disk72 70608a28 4ec7a7ef 70608a28 4ec7a942 vm:root-/>xd -An -j8200 -N16 -tx /dev/disk/disk74 70608a28 4ec7a7f6 70608a28 4ec7a942 ----- On host ----- host:root-/>xd -An -j8200 -N16 -tx /dev/disk/disk532 70608a28 4ec7a7ff 70608a28 4ec7a942 host:root-/>xd -An -j8200 -N16 -tx /dev/disk/disk538 70608a28 4ec7a7f6 70608a28 4ec7a942 host:root-/>xd -An -j8200 -N16 -tx /dev/disk/disk526 70608a28 4ec7a7ef 70608a28 4ec7a942
Now, if you observe outputs (2nd field), guest disk disk76 has the same value as host disk disk532. That means its the same disk! So on host diusk532 is the same as disk76 on the guest. Same with disk538-disk74 & disk 523-disk72.
- Read also: LVM cheatsheet
This is a bit of a tedious job to observe outputs and find a match if you have a huge number of disks. Also, if you are interested in only one VM’s data then its time consuming since you have to match all disks of the host with that VM’s disks. In that case we have
hpvmdevinfo command which directly prints out mapping table for you.
With hpvmdevinfo command
This command comes with an HP iVM setup and shows device mappings from host to guest in tabular format. Since this command can be run against a particular VM, it’s pretty fast to get disk mapping than the previous method.
# hpvmdevinfo -P virtual_svr_2 Virtual Machine Name Device Type Bus,Device,Target Backing Store Type Host Device Name Virtual Machine Device Name ==================== =========== ================= ================== ================ =========================== virtual_svr_2 disk [0,1,0] disk /dev/rdisk/disk336 /dev/rdisk/disk4 virtual_svr_2 disk [0,1,1] disk /dev/rdisk/disk332 /dev/rdisk/disk5 virtual_svr_2 disk [0,1,3] disk /dev/rdisk/disk675 /dev/rdisk/disk9
You need to run this command by supplying VM name with -P option and you will be presented with device list, its
ctd and disk mapping between host-guest servers.
In the above example, see the last two columns where the first one shows disk name on the host machine and last one shows guest/virtual machine. Pretty straight forward and fast!