What I am trying to accomplish is to correlate hard drive in vCenter to the disks in the Linux guest. So here it goes
Opening up settings for the guest in vCenter and moving to hardware tab, shows the lists of hard drives i.e. the .vmdk files. The SCSI id representation is generic - disk 1 is 0:0, disk 2 is 0:1 and so on.
On the guest, I checked the dmesg
and found the sd* devices with their bus and target number. From there, I tried to deduce the relation but I am not sure whether this is the right approach or rather right thing.
[root@blah /]# grep -i attached /var/log/dmesg
sd 0:0:0:0: Attached scsi disk sda
sd 0:0:1:0: Attached scsi disk sdb
sd 0:0:2:0: Attached scsi disk sdc
sd 0:0:3:0: Attached scsi disk sdd
sd 0:0:4:0: Attached scsi disk sde
Now I am trying to relate this disks with the hard drive information that vCenter tells me. I confirmed the h:b:t:l mapping with /proc/scsi/scsi and it looks sane to me.
This is correct... kinda.
Use
lsscsi
. The SCSI device nodes correspond to the controller/target/device naming you see in VMware.Extreme example: