Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:services:storage_services:backup:tsm:admin:fc_stuff [2020/09/10 15:32] – [multipathd commands] bnachtw | en:services:storage_services:backup:tsm:admin:fc_stuff [2023/02/03 09:38] (current) – bnachtw | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== some useful commands around fibre channel ====== | ||
+ | ===== get adapters, WWN, WWPN, etc. ===== | ||
+ | ==== get FC adapters / HBAs ==== | ||
+ | < | ||
+ | h212:~ # ls -l / | ||
+ | total 0 | ||
+ | lrwxrwxrwx 1 root root 0 3. Feb 08:45 host1 -> ../ | ||
+ | lrwxrwxrwx 1 root root 0 3. Feb 08:45 host16 -> ../ | ||
+ | lrwxrwxrwx 1 root root 0 3. Feb 08:45 host17 -> ../ | ||
+ | lrwxrwxrwx 1 root root 0 3. Feb 08:45 host18 -> ../ | ||
+ | </ | ||
+ | ==== get adapter type ==== | ||
+ | < | ||
+ | h212:~ # lspci | grep Fibre | ||
+ | 3b:00.0 Fibre Channel: QLogic Corp. ISP8324-based 16Gb Fibre Channel to PCI Express Adapter (rev 02) | ||
+ | 3b:00.1 Fibre Channel: QLogic Corp. ISP8324-based 16Gb Fibre Channel to PCI Express Adapter (rev 02) | ||
+ | 5e:00.0 Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01) | ||
+ | 5e:00.1 Fibre Channel: QLogic Corp. ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter (rev 01) | ||
+ | </ | ||
+ | ==== get the wwn from the adapters ==== | ||
+ | < | ||
+ | h212:~ # awk ' | ||
+ | device:/ | ||
+ | device:/ | ||
+ | device:/ | ||
+ | device:/ | ||
+ | </ | ||
+ | ==== get Port state ==== | ||
+ | === using systool === | ||
+ | according to [[https:// | ||
+ | * To check the available HBA ports : | ||
+ | < | ||
+ | # systool -c fc_host | ||
+ | Class = " | ||
+ | |||
+ | Class Device = " | ||
+ | Device = " | ||
+ | |||
+ | Class Device = " | ||
+ | Device = " | ||
+ | </ | ||
+ | |||
+ | * To find the WWNs for the HBA ports : | ||
+ | < | ||
+ | # systool -c fc_host -v | grep port_name | ||
+ | port_name | ||
+ | port_name | ||
+ | </ | ||
+ | * To check the state of the HBA ports (online/ | ||
+ | < | ||
+ | # systool -c fc_host -v | grep port_state | ||
+ | port_state | ||
+ | port_state | ||
+ | </ | ||
+ | ===== multipathing ===== | ||
+ | ==== paths & devices ==== | ||
+ | ==== multipathd commands ==== | ||
+ | multipathd is not only the the multipath daemon itself, but also a useful command for analysing the SAN: | ||
+ | < | ||
+ | # multipathd --help | ||
+ | </ | ||
+ | FIXME | ||
+ | |||
+ | ===== Rescaning the SCSI bus ===== | ||
+ | ordinarily you just use the '' | ||
+ | thus, this only reads the configuration again, but does not reinitialize the HBA. | ||
+ | |||
+ | this can be done by: | ||
+ | < | ||
+ | # echo " | ||
+ | </ | ||
+ | replacing '< | ||
+ | |||
+ | ==== manual switch off/on of HBA ==== | ||
+ | thanks to [[https:// | ||
+ | |||
+ | * To list available HBA ports, type: | ||
+ | < | ||
+ | # ls -l / | ||
+ | total 0 | ||
+ | lrwxrwxrwx. 1 root root 0 Jun 24 13:52 host28 -> ../ | ||
+ | lrwxrwxrwx. 1 root root 0 Jun 24 14:15 host29 -> ../ | ||
+ | </ | ||
+ | |||
+ | The '' | ||
+ | |||
+ | |||
+ | The Fibre Channel (FC) HBA port access on RedHat can be temporarily disabled using the unbind string against the pci-device-id bus address. | ||
+ | |||
+ | Syntax: | ||
+ | |||
+ | < | ||
+ | # echo " | ||
+ | </ | ||
+ | |||
+ | To disconnect access for a specific PCI device (81:00:0), the sample syntax would be as follows: | ||
+ | |||
+ | < | ||
+ | # echo " | ||
+ | </ | ||
+ | |||
+ | To display the filename & associated WWN details for all FC HBA controllers: | ||
+ | < | ||
+ | # awk ' | ||
+ | / | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | To display the filename & HBA port status: | ||
+ | < | ||
+ | # awk ' | ||
+ | / | ||
+ | / | ||
+ | </ |