> So say I have /dev/sdf and I want to know if it's on iScsi, PATA, SATA, > USB, etc ... how does one go about doing that in Linux.
BTDT
Check /sys/block/sdX/device. It is a symbolic link which points to an entry <relativepath>/<bus>:<channel>:<id>:<lun>
HTH,
Josef -- These are my personal views and not those of Fujitsu Technology Solutions! Josef Möllers (Pinguinpfleger bei FTS) If failure had no penalty success would not be a prize (T. Pratchett) Company Details: http://de.ts.fujitsu.com/imprint.html
> So say I have /dev/sdf and I want to know if it's on iScsi, PATA, SATA, > USB, etc ... how does one go about doing that in Linux.
For a start: Check /sys/block/sdX/device. It is a symbolic link which points to an entry <relativepath>/<bus>:<channel>:<id>:<lun>
HTH,
Josef -- These are my personal views and not those of Fujitsu Technology Solutions! Josef Möllers (Pinguinpfleger bei FTS) If failure had no penalty success would not be a prize (T. Pratchett) Company Details: http://de.ts.fujitsu.com/imprint.html
>> So say I have /dev/sdf and I want to know if it's on iScsi, PATA, SATA, >> USB, etc ... how does one go about doing that in Linux.
> For a start: Check /sys/block/sdX/device. It is a symbolic link which > points to an entry <relativepath>/<bus>:<channel>:<id>:<lun>
> HTH,
Thanks, I see the symbolic link now and that helps. However it's a little hard to get the actual information and have confidence of good results. For example on this system there is /dev/sda (HD on SLI RAID controller in JBOD mode), /dev/hda (standard PATA), /dev/sdf (usb drive). The results are:
So first .. is it safe to assume linux will aways have the sym link with the same number of components (slashes to bus)? ../x/x/x/BUS ? Next, that RAID controller just has some weird number, how would one convert that to know it's on a RAID bus (really PATA in RAID mode)? Is there a list of bus names ... is it "ide", "usb", "scsi", "iscsi", "fibre", "sata", "1394"?
or is there a much better way to do it like some file "bus" in /sys/block/sda/bus that would have "RAID" in it ? Well wishful thinking anyway?