RE: External eSATA drive doesn't fdisk properly ? F8 eSATA hotplug ?

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

 



>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@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@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@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

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux