Monday, September 14, 2015

How to find out the vhost information of the disk?

How to find out the vhost information of the disk?


Sometimes we are in the situation to find out the VHOST information of particular hdisk. We can easily find out using the below method.


   ü First we need to find out in what VTD the hdisk is belongs to.
   ü Then using VTD, we can find out the vhost info.


For example, if we want to find out the hdisk5 is part of which vhost? Now the short cut is below.


  ü find out vtd which is belongs to the hdisk 

                   $lsmap -all|grep -p hdisk5

                             VTD                   testmachine-16
                             Status                Available
                             LUN                   0x8700000000000000
                             Backing device        hdisk5
                             Physloc               U7311.D20.067DDBB-P1-C02-T1-L113



   ü Now find out the vhost belongs to the VTD

                 syntax:   lsdev -dev <VTD> -field parent

                   $lsdev -dev testmachine-16 -field parent

                             parent
                             vhost3


So hdisk5 is part of vhost3


To confirm:

$lsmap -vadapter vhost3
SVSA            Physloc                                      Client Partition ID
--------------- -------------------------------------------- ------------------
vhost3          U9133.55A.065040H-V22-C16                    0x00000003
VTD                   testmachine-16
Status                Available
LUN                   0x8700000000000000
Backing device        hdisk5

Physloc               U7311.D20.067DDBB-P1-C02-T1-L113

VTD                   testmachine-15
Status                Available
LUN                   0x9200000000000000
Backing device        hdisk6
Physloc               U7311.D20.067DDBB-P1-C02-T1-L66