System information
25.9. Scanning St orage Int erconnect s
There are several commands available that allow you to reset and/or scan one or more
interconnects, potentially adding and removing multiple devices in one operation. This type of scan
can be disruptive, as it can cause delays while I/O operations timeout, and remove devices
unexpectedly. As such, Red Hat recommends that this type of scan be used only when necessary. In
addition, the following restrictions must be observed when scanning storage interconnects:
1. All I/O on the effected interconnects must be paused and flushed before executing the
procedure, and the results of the scan checked before I/O is resumed.
2. As with removing a device, interconnect scanning is not recommended when the system is
under memory pressure. To determine the level of memory pressure, run the command vmstat
1 10 0 ; interconnect scanning is not recommended if free memory is less than 5% of the total
memory in more than 10 samples per 100. It is also not recommended if swapping is active
(non-zero si and so columns in the vmstat output). The command free can also display
the total memory.
The following commands can be used to scan storage interconnects.
echo "1" > /sys/cl ass/fc_ho st/ho st/i ssue_l i p
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. This procedure is
necessary to configure a new SCSI target on a Fibre Channel interconnect.
Bear in mind that i ssue_l i p is an asynchronous operation. The command may complete
before the entire scan has completed. You must monitor /var/l o g /messag es to
determine when it is done.
The lpfc, q l a2xxx, and bnx2fc drivers support i ssue_l i p. For more information
about the API capabilities supported by each driver in Red Hat Enterprise Linux, refer to
Table 25.1, “ Fibre-Channel API Capabilities” .
/usr/bi n/rescan-scsi -bus. sh
This script was included as of Red Hat Enterprise Linux 5.4. 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. For
more information about this script (including known issues), refer to Section 25.15,
“ Adding/Removing a Logical Unit Through rescan-scsi-bus.sh” .
echo "- - -" > /sys/cl ass/scsi _ho st/ho sth/scan
This is the same command described in Section 25.6, “ Adding a Storage Device or Path” to
add a storage device or path. 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.
rmmo d d ri ver-name o r mo d pro be d ri ver-name
These commands completely re-initialize the state of all interconnects controlled by the
driver. Although this is extreme, it may be appropriate in some situations. This may be used,
for example, to re-start the driver with a different module parameter value.
25.10. iSCSI Discovery Configurat ion
Chapt er 2 5. O nline St orag e Manag ement
181