I found a lot of stuff about this on the web, but never an answer that
worked. One of the most promising hints was about udev maintaining
links in the /dev/disk/by-* directories. This works just fine in CentOS
5, but not CentOS 4. As I was trying to use the iSCSI devices as VMware
disks this was particularly frustrating. After banging my head on this
for a while, I figured out how to make it work.
By default, iSCSI devices don't show up in the /dev/disk/by-*
directories maintained by udev under CentOS 4. After looking at the
scripts used by udev, it appeared that the scsi_id program was not
returning anything for the iSCSI devices. Digging in the manpage and
the /etc/scsi_id.config file led me to believe that the devices in
question were "blacklisted" and never returned a valid device ID.
The fix was to add a line to scsi_id.config to whitelist the particular
devices. In my case, the iSCSI devices are provided by on Openfiler
box, which shows up in /proc/scsi/scsi like this:
Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: Openfile Model: Virtual disk Rev: 0
Type: Direct-Access ANSI SCSI revision: 04
The fix for me was to add the following line to my iscsi_id.config file:
vendor=Openfile, model="Virtual disk", options=-g
The values for "vendor=" and "model=" will vary with the specific iSCSI
target used. After adding this and rebooting, udev now properly
maintains the links in /dev/disk/by-id/ for each of the iSCSI devices
offered up to my workstation.
Hope that helps somebody!
--
Jay Leafey - Memphis, TN
jay.leafey(a)mindless.com