System information

Pro ced u re 25.2. Remo vin g a Pat h t o a St o rag e Device
1. Remove any reference to the device's path-based name, like /d ev/sd or /d ev/d i sk/by-
path or the majo r: mi no r number, in applications, scripts, or utilities on the system. This is
important in ensuring that different devices added in the future will not be mistaken for the
current device.
2. Take the path offline using echo o ffl i ne > /sys/bl o ck/sd a/d evi ce/state.
This will cause any subsequent I/O sent to the device on this path to be failed immediately.
Device- map p er- mu lt ip at h will continue to use the remaining paths to the device.
3. Remove the path from the SCSI subsystem. To do so, use the command echo 1 >
/sys/bl o ck/device-name/d evi ce/d el ete where device-name may be sd e, for
example (as described in Procedure 25.1, “Ensuring a Clean Device Removal ).
After performing Procedure 25.2, “Removing a Path to a Storage Device” , the path can be safely
removed from the running system. It is not necessary to stop I/O while this is done, as d evice-
map p er- mu lt ip at h will re-route I/O to remaining paths according to the configured path grouping
and failover policies.
Other procedures, such as the physical removal of the cable, followed by a rescan of the SCSI bus to
cause the operating system state to be updated to reflect the change, are not recommended. This will
cause delays due to I/O timeouts, and devices may be removed unexpectedly. If it is necessary to
perform a rescan of an interconnect, it must be done while I/O is paused, as described in
Section 25.9, “ Scanning Storage Interconnects .
25.6. Adding a St orage Device or Pat h
When adding a device, be aware that the path-based device name (/d ev/sd name, majo r: mi no r
number, and /d ev/d i sk/by-path name, for example) the system assigns to the new device may
have been previously in use by a device that has since been removed. As such, ensure that all old
references to the path-based device name have been removed. Otherwise, the new device may be
mistaken for the old device.
Pro ced u re 25.3. Ad d a st o rag e d evice o r pat h
1. The first step in adding a storage device or path is to physically enable access to the new
storage device, or a new path to an existing device. This is done using vendor-specific
commands at the Fibre Channel or iSCSI storage server. When doing so, note the LUN value
for the new storage that will be presented to your host. If the storage server is Fibre Channel,
also take note of the World Wide Node Name (WWNN) of the storage server, and determine
whether there is a single WWNN for all ports on the storage server. If this is not the case, note
the World Wide Port Name (WWPN) for each port that will be used to access the new LUN.
2. Next, make the operating system aware of the new storage device, or path to an existing
device. The recommended command to use is:
$ echo "c t l" > /sys/class/scsi_host/hosth/scan
In the previous command, h is the HBA number, c is the channel on the HBA, t is the SCSI
target ID, and l is the LUN.
Red Hat Ent erprise Lin ux 6 St orage Admin ist rat io n G uide
174