This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux:discover_devices [2021/03/03 14:32] manu |
linux:discover_devices [2022/03/20 22:05] (current) manu |
||
---|---|---|---|
Line 19: | Line 19: | ||
<cli prompt='#'> | <cli prompt='#'> | ||
- | [root@fedora01 ~]# lsscsi | + | [root@fedora01 ~]# lsscsi -s |
- | [0:0:0:0] disk VMware Virtual disk 1.0 /dev/sda | + | [0:0:0:0] disk VMware Virtual disk 2.0 /dev/sda 75.1GB |
- | [0:0:1:0] disk VMware Virtual disk 1.0 /dev/sdb | + | [0:0:20:0] disk VMware Virtual disk 2.0 /dev/sdb 17.1GB |
+ | [0:0:21:0] disk VMware Virtual disk 2.0 /dev/sdc 17.1GB | ||
+ | [1:0:0:0] disk IBM 2145 0000 /dev/sdd 137GB | ||
+ | [1:0:1:0] disk IBM 2145 0000 /dev/sde 137GB | ||
</cli> | </cli> | ||
Line 97: | Line 100: | ||
[root@fedora22 multipath]# rescan-scsi-bus.sh -r | [root@fedora22 multipath]# rescan-scsi-bus.sh -r | ||
</cli> | </cli> | ||
+ | |||
+ | ===== systool ===== | ||
+ | |||
+ | <cli prompt='#'> | ||
+ | # systool | ||
+ | Supported sysfs buses: | ||
+ | scsi | ||
+ | usb | ||
+ | ... | ||
+ | Supported sysfs classes: | ||
+ | sas_host | ||
+ | scsi_device | ||
+ | scsi_disk | ||
+ | scsi_generic | ||
+ | scsi_host | ||
+ | usbmon | ||
+ | ... | ||
+ | Supported sysfs devices: | ||
+ | cpu | ||
+ | system | ||
+ | ... | ||
+ | Supported sysfs modules: | ||
+ | tpm_tis | ||
+ | usbnet | ||
+ | vt | ||
+ | xfs | ||
+ | ... | ||
+ | |||
+ | # systool -c fc_host -v | more | ||
+ | Class = "fc_host" | ||
+ | |||
+ | Class Device = "host5" | ||
+ | Class Device path = "/sys/devices/pci0000:00/0000:00:03.0/0000:15:00.0/host5/fc_host/host5" | ||
+ | dev_loss_tmo = "30" | ||
+ | fabric_name = "0x1000000533b6dd57" | ||
+ | issue_lip = <store method only> | ||
+ | max_npiv_vports = "254" | ||
+ | node_name = "0x20000024ff3434e4" | ||
+ | npiv_vports_inuse = "0" | ||
+ | port_id = "0x010000" | ||
+ | port_name = "0x21000024ff3434e4" | ||
+ | port_state = "Online" | ||
+ | port_type = "NPort (fabric via point-to-point)" | ||
+ | speed = "8 Gbit" | ||
+ | supported_classes = "Class 3" | ||
+ | supported_speeds = "1 Gbit, 2 Gbit, 4 Gbit, 8 Gbit" | ||
+ | symbolic_name = "QLE2562 FW:v5.08.00 DVR:v8.04.00.08.06.4-k" | ||
+ | system_hostname = "" | ||
+ | tgtid_bind_type = "wwpn (World Wide Port Name)" | ||
+ | uevent = | ||
+ | vport_create = <store method only> | ||
+ | vport_delete = <store method only> | ||
+ | </cli> | ||
+ | |||
+ | If you only want to get host5 info, then here you go | ||
+ | <cli prompt='#'> | ||
+ | # systool -c fc_host -v -d host5 | ||
+ | Well, module detail info | ||
+ | # systool -m qla2xxx -v | ||
+ | Module = "qla2xxx" | ||
+ | |||
+ | Attributes: | ||
+ | initstate = "live" | ||
+ | refcnt = "288" | ||
+ | srcversion = "C5EBE96340369EB294E6D44" | ||
+ | version = "8.04.00.08.06.4-k" | ||
+ | |||
+ | Parameters: | ||
+ | ql2xallocfwdump = "1" | ||
+ | ql2xasynclogin = "1" | ||
+ | ... | ||
+ | </cli> | ||
+ | |||
+ | To get HBA info | ||
+ | <cli prompt='#'> | ||
+ | # systool -c fc_host -A port_name | ||
+ | Class = "fc_host" | ||
+ | |||
+ | Class Device = "host5" | ||
+ | port_name = "0x21000024ff3434e4" | ||
+ | |||
+ | Device = "host5" | ||
+ | |||
+ | |||
+ | Class Device = "host6" | ||
+ | port_name = "0x21000024ff3434e5" | ||
+ | |||
+ | Device = "host6" | ||
+ | </cli> | ||
+ | |||
+ | Check scsi disk path | ||
+ | <cli prompt='#'> | ||
+ | # systool -c scsi_disk -d 0:5:0 -p | ||
+ | Class = "scsi_disk" | ||
+ | |||
+ | Class Device = "0:5:0" | ||
+ | Class Device path = "/sys/devices/pci0000:00/0000:00:03.0/0000:15:00.0/host5/rport-5:0-7/target5:0:5/5:0:5:0/scsi_disk/5:0:5:0" | ||
+ | Device = "5:0:5:0" | ||
+ | Device path = "/sys/devices/pci0000:00/0000:00:03.0/0000:15:00.0/host5/rport-5:0-7/target5:0:5/5:0:5:0" | ||
+ | |||
+ | |||
+ | Class Device = "0:5:0" | ||
+ | Class Device path = "/sys/devices/pci0000:00/0000:00:03.0/0000:15:00.1/host6/rport-6:0-8/target6:0:5/6:0:5:0/scsi_disk/6:0:5:0" | ||
+ | Device = "6:0:5:0" | ||
+ | Device path = "/sys/devices/pci0000:00/0000:00:03.0/0000:15:00.1/host6/rport-6:0-8/target6:0:5/6:0:5:0" | ||
+ | </cli> | ||
+ | |||
+ | Get usb info | ||
+ | <cli prompt='#'> | ||
+ | # systool -b usb -d usb1 -v | ||
+ | Bus = "usb" | ||
+ | |||
+ | Device = "usb1" | ||
+ | Device path = "/sys/devices/pci0000:00/0000:00:1a.7/usb1" | ||
+ | authorized = "1" | ||
+ | ... | ||
+ | </cli> | ||
+ | |||
+ | Check local disk | ||
+ | <cli prompt='#'> | ||
+ | # systool -c scsi_disk -v 1:0:0 | ||
+ | Class = "scsi_disk" | ||
+ | |||
+ | Class Device = "1:0:0" | ||
+ | Class Device path = "/sys/devices/pci0000:00/0000:00:1c.0/0000:01:00.0/host0/target0:1:0/0:1:0:0/scsi_disk/0:1:0:0" | ||
+ | FUA = "0" | ||
+ | allow_restart = "0" | ||
+ | app_tag_own = "0" | ||
+ | cache_type = "write through" | ||
+ | manage_start_stop = "0" | ||
+ | protection_mode = "none" | ||
+ | protection_type = "0" | ||
+ | provisioning_mode = "full" | ||
+ | thin_provisioning = "0" | ||
+ | uevent = | ||
+ | |||
+ | Device = "0:1:0:0" | ||
+ | Device path = "/sys/devices/pci0000:00/0000:00:1c.0/0000:01:00.0/host0/target0:1:0/0:1:0:0" | ||
+ | delete = <store method only> | ||
+ | device_blocked = "0" | ||
+ | dh_state = "detached" | ||
+ | evt_media_change = "0" | ||
+ | iocounterbits = "32" | ||
+ | iodone_cnt = "0x28eab" | ||
+ | ioerr_cnt = "0x35" | ||
+ | iorequest_cnt = "0x28eab" | ||
+ | modalias = "scsi:t-0x00" | ||
+ | model = "Logical Volume " | ||
+ | queue_depth = "128" | ||
+ | queue_ramp_up_period= "120000" | ||
+ | queue_type = "simple" | ||
+ | rescan = <store method only> | ||
+ | rev = "3000" | ||
+ | sas_address = "0x0396c469eb687835" | ||
+ | sas_device_handle = "0x00b5" | ||
+ | scsi_level = "7" | ||
+ | state = "running" | ||
+ | timeout = "30" | ||
+ | type = "0" | ||
+ | uevent = "DEVTYPE=scsi_device | ||
+ | DRIVER=sd | ||
+ | MODALIAS=scsi:t-0x00" | ||
+ | vendor = "LSI " | ||
+ | |||
+ | FC remote port info | ||
+ | # systool -c fc_remote_ports -v -d 0-8 | ||
+ | Class = "fc_remote_ports" | ||
+ | |||
+ | Class Device = "0-8" | ||
+ | Class Device path = "/sys/devices/pci0000:00/0000:00:03.0/0000:15:00.0/host5/rport-5:0-8/fc_remote_ports/rport-5:0-8" | ||
+ | dev_loss_tmo = "30" | ||
+ | fast_io_fail_tmo = "off" | ||
+ | node_name = "0x20000024ff3434d4" | ||
+ | port_id = "0x010200" | ||
+ | port_name = "0x21000024ff3434d4" | ||
+ | port_state = "Online" | ||
+ | roles = "FCP Initiator" | ||
+ | scsi_target_id = "-1" | ||
+ | supported_classes = "Class 3" | ||
+ | uevent = | ||
+ | |||
+ | Device = "rport-5:0-8" | ||
+ | Device path = "/sys/devices/pci0000:00/0000:00:03.0/0000:15:00.0/host5/rport-5:0-8" | ||
+ | uevent = | ||
+ | |||
+ | |||
+ | Class Device = "0-8" | ||
+ | Class Device path = "/sys/devices/pci0000:00/0000:00:03.0/0000:15:00.1/host6/rport-6:0-8/fc_remote_ports/rport-6:0-8" | ||
+ | dev_loss_tmo = "30" | ||
+ | fast_io_fail_tmo = "off" | ||
+ | node_name = "0x20060080e52d2652" | ||
+ | port_id = "0x011200" | ||
+ | port_name = "0x20460080e52d2652" | ||
+ | port_state = "Online" | ||
+ | roles = "FCP Target" | ||
+ | scsi_target_id = "5" | ||
+ | supported_classes = "Class 3" | ||
+ | uevent = | ||
+ | |||
+ | Device = "rport-6:0-8" | ||
+ | Device path = "/sys/devices/pci0000:00/0000:00:03.0/0000:15:00.1/host6/rport-6:0-8" | ||
+ | uevent = | ||
+ | </cli> | ||
+ | |||
+ | ===== Rescan Iscsi ===== | ||
+ | |||
+ | <cli prompt='>'> | ||
+ | iscsiadm -m session # Obtain the list of all the current sessions | ||
+ | iscsiadm -m session --sid=N --rescan # Rescan a specific session N is the specific session ID. | ||
+ | iscsiadm -m session --rescan # Rescan all the sessions | ||
+ | /usr/bin/rescan-scsi-bus.sh # Rescan using the SCSI rescan script | ||
+ | </cli> | ||
+ | |||
+ | |||
+ | |||
+ |