External eSATA drive doesn't fdisk properly ? F8 eSATA hotplug ?
Joseph L. Casale
JCasale at activenetwerx.com
Thu Oct 2 03:34:33 UTC 2008
>How do I find out what host a device is running on ?
>
>Thanks
Well, using the 2.4 kernel method of /proc,
on a small server exporting some iSCSI targets here, I get this:
[root at host ~]# #cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: ST3160812AS Rev: 3.AA
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: ST3160812AS Rev: 3.AA
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi2 Channel: 02 Id: 00 Lun: 00
Vendor: LSI Model: MegaRAID 8888ELP Rev: 1.12
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi2 Channel: 02 Id: 01 Lun: 00
Vendor: LSI Model: MegaRAID 8888ELP Rev: 1.12
Type: Direct-Access ANSI SCSI revision: 05
But that's being deprecated by the /sys in the 2.6 kernels, and aside from
looking manually which can be tedious, I just install lsscsi,
[root at host ~]# lsscsi
[0:0:0:0] disk ATA ST3160812AS 3.AA /dev/sda
[1:0:0:0] disk ATA ST3160812AS 3.AA /dev/sdb
[2:2:0:0] disk LSI MegaRAID 8888ELP 1.12 /dev/sdc
[2:2:1:0] disk LSI MegaRAID 8888ELP 1.12 /dev/sdd
If your distro doesn't have lsscsi or you don't want to install it just use
the /proc method...
So to rescan everything on the 8888ELP, I would issue:
[root at host ~]# echo "- - -" > /sys/class/scsi_host/host2/scan
Which is exactly what I use to enumerate any new arrays I configure via the
MegaRAID cli when I can't reboot if for example I can not unmount a target.
HTH,
jlc
More information about the fedora-list
mailing list