- Linux Commands Cheat Sheet popular
- Windows Commands Cheat Sheet popular
- How to use proxy in Linux popular
- Shell Script Cheat Sheet popular
|To see what Fibre Channel devices are connected to the Fibre Channel HBA cards||systool -c fc_remote_ports -v –d|
|For Fibre Channel transport information||systool -c fc_transport –v|
|For information on SCSI disks connected to a system||systool -c scsi_disk -v|
|To examine more disk information including which hosts are connected to which disks||systool -b scsi –v|
|Use the sg_map command to view more information about the SCSI map||sg_map –x|
|ls -l /dev/disk/by-id/|
The following commands can be used to scan storage interconnects.
# cd /opt/hp/hp_fibreutils # ./hp_rescan -a
You must install fibreutils-x.x-x.x86_64.rpm
You can download SPP of SDR like below.
This operation performs a Loop Initialization Protocol (LIP) and then scans the interconnect and causes the SCSI layer to be updated to reflect the devices currently on the bus. A LIP is, essentially, a bus reset, and will cause device addition and removal.
echo "1" > /sys/class/fc_host/hostN/issue_lip echo "1" > /sys/class/fc_host/host0/issue_lip echo "1" > /sys/class/fc_host/host1/issue_lip
By default, this script scans all the SCSI buses on the system, updating the SCSI layer to reflect new devices on the bus. The script provides additional options to allow device removal and the issuing of LIPs.
In this case, however, the channel number, SCSI target ID, and LUN values are replaced by wildcards. Any combination of identifiers and wildcards is allowed, allowing you to make the command as specific or broad as needed. This procedure will add LUNs, but not remove them.
echo "- - -" > /sys/class/scsi_host/hostN/scan echo "- - -" > /sys/class/scsi_host/host0/scan echo "- - -" > /sys/class/scsi_host/host1/scan echo "- - -" > /sys/class/scsi_host/host3/scan
These commands completely re-initialize the state of all interconnects controlled by the driver.
rmmod driver-name <- remove a module from the Linux Kernel modprobe driver-name <- add modules from the Linux Kernel
# dmsetup ls --target=multipath mpath2 (253, 1) <- LUN1 mpath1 (253, 0) <- LUN0 mpath3 (253, 2) <- LUN2 #