If your system has already been configured for multipathing and you later need to add more storage to the SAN, you can use the rescan-scsi-bus.sh script to scan for the new devices. By default, this script scans all HBAs with typical LUN ranges.
rescan-scsi-bus.sh [options] [host [host ...]]
You can specify hosts on the command line (deprecated), or use the --hosts=LIST option (recommended).
For most storage subsystems, the script can be run successfully without options. However, some special cases might need to use one or more of the following parameters for the rescan-scsi-bus.sh script:
|
Option |
Description |
|---|---|
-l |
Activates scanning for LUNs 0-7. [Default: 0] |
-L NUM |
Activates scanning for LUNs 0 to NUM. [Default: 0] |
-w |
Scans for target device IDs 0 to 15. [Default: 0 to 7] |
-c |
Enables scanning of channels 0 or 1. [Default: 0] |
-r --remove |
Enables removing of devices. [Default: Disabled] |
-i --issueLip |
Issues a Fibre Channel LIP reset. [Default: Disabled] |
--forcerescan |
Rescans existing devices. |
--forceremove |
Removes and re-adds every device. (DANGEROUS) |
--nooptscan |
Don’t stop looking for LUNs if 0 is not found. |
--color |
Use colored prefixes OLD/NEW/DEL. |
--hosts=LIST |
Scans only hosts in LIST, where LIST is a comma-separated list of single values and ranges. No spaces are allowed. --hosts=A[-B][,C[-D]] |
--channels=LIST |
Scans only channels in LIST, where LIST is a comma-separated list of single values and ranges. No spaces are allowed. --channels=A[-B][,C[-D]] |
--ids=LIST |
Scans only target IDs in LIST, where LIST is a comma-separated list of single values and ranges. No spaces are allowed. --ids=A[-B][,C[-D]] |
--luns=LIST |
Scans only LUNs in LIST, where LIST is a comma-separated list of single values and ranges. No spaces are allowed. --luns=A[-B][,C[-D]] |
Use the following procedure to scan the devices and make them available to multipathing without rebooting the system.
On the storage subsystem, use the vendor’s tools to allocate the device and update its access control settings to allow the Linux system access to the new storage. Refer to the vendor’s documentation for details.
Scan all targets for a host to make its new device known to the middle layer of the Linux kernel’s SCSI subsystem. At a terminal console prompt, enter
rescan-scsi-bus.sh [options]
Check for scanning progress in the system log (the /var/log/messages file). At a terminal console prompt, enter
tail -30 /var/log/messages
This command displays the last 30 lines of the log. For example:
# tail -30 /var/log/messages . . . Feb 14 01:03 kernel: SCSI device sde: 81920000 Feb 14 01:03 kernel: SCSI device sdf: 81920000 Feb 14 01:03 multipathd: sde: path checker registered Feb 14 01:03 multipathd: sdf: path checker registered Feb 14 01:03 multipathd: mpath4: event checker started Feb 14 01:03 multipathd: mpath5: event checker started Feb 14 01:03:multipathd: mpath4: remaining active paths: 1 Feb 14 01:03 multipathd: mpath5: remaining active paths: 1
Repeat Step 2 through Step 3 to add paths through other HBA adapters on the Linux system that are connected to the new device.
Run the multipath command to recognize the devices for DM-MP configuration. At a terminal console prompt, enter
multipath
You can now configure the new device for multipathing.