> Rob Landley wrote: >> So if you don't attach an sg to every sd, then either there are holes, or they >> don't line up, in which case how do you tell which sg goes with a given sd? Sysfs has pointers from a SCSI logical unit device to the corresponding sd device and sg device... $ ll /sys/bus/scsi/devices/1\:0\:0\:0/[bg]* lrwxrwxrwx 1 root root 0 Aug 2 23:23 /sys/bus/scsi/devices/1:0:0:0/block:sdb -> ../../../../../../block/sdb lrwxrwxrwx 1 root root 0 Aug 2 23:23 /sys/bus/scsi/devices/1:0:0:0/generic -> ../../../../../../class/scsi_generic/sg1 ...as well as from the sd and sg devices to the corresponding SCSI logical unit device: $ ll /sys/block/sdb/device lrwxrwxrwx 1 root root 0 Aug 2 23:27 /sys/block/sdb/device -> ../../devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0 $ ll /sys/class/scsi_generic/sg1/device lrwxrwxrwx 1 root root 0 Aug 2 23:24 /sys/class/scsi_generic/sg1/device -> ../../../devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0 The place where these symlinks live might change in the future. See linux-2.6.23*/Documentation/sysfs-rules.txt. -- Stefan Richter -=====-=-=== =--- ---=- http://arcgraph.de/sr/ - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html