Re: Some quick scsi documentation questions:

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux