Hide Forgot
The RHEL 6 Storage Administration Guide: http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6-Beta/html-single/Storage_Administration_Guide/index.html Chapter 24. Online Storage Management Describes how to add or remove a device (or a path to a device) while I/O is on-going. The manual indicates that this must be done one device (or path) at a time. The following fully-specified commands must be used: to delete: echo 1 > /sys/class/scsi_device/h:c:t:l/device/delete or to add: echo "c t l" > /sys/class/scsi_host/hosth/scan Later, in the section: 24.9. Scanning Storage Interconnects The manual describes several ways to entirely re-scan one or more storage interconnects while the system is running: 1. echo "1" > /sys/class/fc_host/host/issue_lip 2. /usr/bin/rescan-scsi-bus.sh 3. echo "- - -" > /sys/class/scsi_host/hosth/scan 4. rmmod driver-name or modprobe driver-name The manual stipulates that these commands can only be used when 1) All I/O on the interconnect is paused and flushed, and 2) the system is not under memory pressure. These precautions are there to reduce the risk of any errors during scanning, or delays, or the possible unexpected addition and removal of multiple devices at the same time. The feedback we have gotten is that the requirement to fully-specify the scan command is difficult and error prone. In response to this, we have conducted some targeted code review and testing. We have determined that, as of RHEL 5.6, it is safe to allow wildcards in the search command, as follows: echo "- - -" > /sys/class/scsi_host/hosth/scan (This command scans all channels, targets and LUNs or a particular HBA port.) A change to reflect this new capability is needed on this manual, as well as the RHEL 5 Online Storage Reconfiguration Guide.
Here is another change in this area of this manual: In "24.6. Adding a Storage Device or Path" in step 2, after "Note: The older form of this command, echo "scsi add-single-device 0 0 0 0" > /proc/scsi/scsi, is deprecated." add a second note: "Note: In some Fibre Channel hardware configurations, when a new LUN is created on the RAID array it may not be visible to the operating system until after a LIP (Loop Initialization Protocol) operation is performed. Refer to 24.9. Scanning Storage Interconnects for instructions on how to do this. If a LIP is required, it will be necessary to stop I/O while this operation is done. If a new LUN has been added on the RAID array, but it is still not being configured by the operating system, you can confirm the list of LUNs that are being exported by the array using the sg_luns command (part of the sg3_utils package). This will issue the SCSI REPORT LUNS command to the RAID array, and return a list of the LUNs that are present."