How does Linux determine the SCSI address of a disk?
Posted
by
Chris Sears
on Server Fault
See other posts from Server Fault
or by Chris Sears
Published on 2011-01-10T23:00:46Z
Indexed on
2011/01/10
23:55 UTC
Read the original article
Hit count: 313
Greetings,
I'm working with RHEL 5.5 guest VMs under VMware ESX 4. When I configure the virtual disks in the VM hardware settings, each disk has a SCSI address in the format "N:M". For example, "1:3" would mean SCSI host number 1 and SCSI target ID 3.
When I look at the disk info from the VM's BIOS or a Windows OS, the detected SCSI address info matches up with the virtual hardware settings. But under Linux, the SCSI address components don't match up, at least not completely or consistently.
I've tried the three supported virtual SCSI and SAS drivers and they all seem to be "broken", but in different ways. Here's a list of the virtual hardware addresses vs what was detected under Linux with each of the drivers:
Driver vHW Addr Linux Addr
-------- -------- ----------
LSI SAS 0:0 0:0
LSI SAS 0:3 0:1
LSI SAS 0:6 0:2
LSI SCSI 1:1 2:1
LSI SCSI 1:4 2:4
LSI SCSI 1:7 2:7
pvSCSI 2:2 1:2
pvSCSI 2:5 1:5
pvSCSI 2:8 1:8
My main question is why does this happen under Linux? The next question is: how do I get it fixed or fix it myself?
If I was going to guess, I'd say it's an issue with how the kernel is handing out the SCSI host number and how the Linux SCSI driver (included with VMware tools) is detecting the SCSI target number. Perhaps the order the drivers are loaded also has something to do with the issue. I'm guessing this would not involve udev, but I could be wrong.
Any thoughts would be appreciated. Thanks!
PS. My environment is VMware, but I don't need an answer for these drivers specifically. I imagine this might be a problem with any SCSI driver under Linux.
© Server Fault or respective owner