Linux Storage - mppBusRescan commands
Linux Storage Solution · Config document · referenced from RDAC installation and operation
mppBusRescan -s, -d, -u and -c show mptscsih adapters host0 to host5 and a virtual host host6 with disks sdo and sdp. That is not mppsrv01, which has two qla2xxx HBAs and the virtual adapter host2; those four outputs were kept from another machine or from documentation, and the notes do not say which. Only the plain mppBusRescan output is from this host.mppBusRescan, also reachable as hot_add (/usr/sbin/hot_add is a link to /usr/sbin/mppBusRescan), is the RDAC (MPP) driver's way of finding a new array or LUN on the SAN without a reboot, of removing devices that were unmapped or disconnected, of picking up a remapped LUN and of refreshing a LUN whose size has changed. It scans the physical HBAs first, then has the driver build the virtual LUNs (mppUtil -s busscan), then scans the virtual adapter.
| Item | Value |
|---|---|
| Command | /usr/sbin/mppBusRescan, link /usr/sbin/hot_add |
| Run as | root on mppsrv01 (the plain mppBusRescan example); the -s, -d, -u, -c examples are from another host, see the note |
| Host | Red Hat Enterprise Linux AS 4, kernel 2.6.9-89.0.9.ELsmp, HBAs host0 and host1 (qla2xxx), virtual MPP adapter host2 |
| Found | the standby array DS5300-SITEB: targets 2 and 3 on both HBAs, LUNs 1 and 2, as /dev/sdc and /dev/sdd on host2 |
| Driver version | RDAC 09.03.0B05.0331 |
The commands
The usage list as the notes keep it. Each task has a long and a short option, and the first two tasks can be given to hot_add or to mppBusRescan alike; the notes list the alternatives with "or" between them, and here they stand as consecutive lines. None of these lines has output in the notes:
$ mppBusRescan $ mppBusRescan -s $ mppBusRescan --scan $ hot_add $ hot_add -s $ hot_add --scan $ hot_add -d $ hot_add --delete $ mppBusRescan -d $ mppBusRescan --delete $ mppBusRescan -u $ mppBusRescan --update $ mppBusRescan -c $ mppBusRescan --capacity
| Lines | Task, as the notes word it |
|---|---|
mppBusRescan, -s, --scan, or hot_add with the same options | find (scan) a new disk array on the physical bus (the SAN); the plain command scans too |
hot_add -d, --delete, or mppBusRescan with the same options | remove (delete) an unmapped or disconnected device |
mppBusRescan -u, --update | check whether a device or LUN has changed; if so, update RDAC with the newly remapped device or LUN |
mppBusRescan -c, --capacity | check whether the capacity of a device or LUN has changed; if so, update its capacity |
The examples with output
Finding the new disk array on mppsrv01. The two QLogic hosts are scanned first, the driver is told to scan (mppUtil -s busscan), and the virtual host host2 is scanned last and gives the new LUNs their disk names:
$ mppBusRescanoutput 14 lines
scan qla2 HBA host /sys/class/scsi_host/host1...
found 1:0:2:1
found 1:0:2:2
found 1:0:3:1
found 1:0:3:2
scan qla2 HBA host /sys/class/scsi_host/host0...
found 0:0:2:1
found 0:0:2:2
found 0:0:3:1
found 0:0:3:2
run /usr/sbin/mppUtil -s busscan...
scan mpp virtual host /sys/class/scsi_host/host2...
found 2:0:1:1->/dev/sdc
found 2:0:1:2->/dev/sddThe explicit scan, on the other machine (see the note):
$ mppBusRescan -soutput 24 lines
Starting new devices re-scan...
scan mptscsih HBA host /sys/class/scsi_host/host5...
no new device found
scan mptscsih HBA host /sys/class/scsi_host/host4...
no new device found
scan mptscsih HBA host /sys/class/scsi_host/host3...
no new device found
scan mptscsih HBA host /sys/class/scsi_host/host2...
found 2:0:0:7
found 2:0:0:9
found 2:0:1:7
found 2:0:1:9
found 2:0:2:7
found 2:0:2:9
found 2:0:3:7
found 2:0:3:9
scan mptscsih HBA host /sys/class/scsi_host/host1...
no new device found
scan mptscsih HBA host /sys/class/scsi_host/host0...
no new device found
run /usr/sbin/mppUtil -s busscan...
scan mpp virtual host /sys/class/scsi_host/host6...
found 6:0:0:7->/dev/sdo
found 6:0:0:9->/dev/sdpRemoving unmapped or disconnected devices, same machine:
$ mppBusRescan -doutput 3 lines
Searching for unmapped or disconnected MPP devices. Found 6:0:0:7/sdo as unmapped/disconnected device. Device removed. Found 6:0:0:9/sdp as unmapped/disconnected device. Device removed.
Checking for a remapped device or LUN and updating RDAC with it:
$ mppBusRescan -uoutput 3 lines
Searching for remapped MPP devices. Found 6:0:0:7/sdo as remapped device. Device updated. Found 6:0:0:9/sdp as remapped device. Device updated.
Checking for a changed capacity and updating it:
$ mppBusRescan -coutput 3 lines
Searching for MPP device with size modified Found 6:0:0:7/sdo with size modified. Device size updated. Found 6:0:0:9/sdp with size modified. Device size updated.
Reading the outputs
| Line | Reading |
|---|---|
scan qla2 HBA host /sys/class/scsi_host/host1... | the tool walks the SCSI hosts of the low-level driver and asks each for new devices; host1 came first here |
found 1:0:2:1 … found 0:0:3:2 | eight new physical devices, host:channel:target:lun: on each HBA two new targets (2 and 3, the two controllers of DS5300-SITEB) with LUNs 1 and 2. These are exactly the eight devices removed in Hot removal of a LUN |
run /usr/sbin/mppUtil -s busscan... | the driver is told to look at the new physical devices and build the virtual LUNs |
scan mpp virtual host /sys/class/scsi_host/host2... | the virtual adapter is scanned last |
found 2:0:1:1->/dev/sdc, found 2:0:1:2->/dev/sdd | the two virtual LUNs of the new array (target 1 on the virtual adapter, which is the H2C0T1 of its .wwn file) and the disk names they got; lsvdev shows the same mapping, see mppUpdate and lsvdev |
scan mptscsih HBA host …host5, found 6:0:0:7->/dev/sdo | the other machine: six hosts of the mptscsih driver (as I know it, the LSI Fusion-MPT driver, not the QLogic one of mppsrv01), the new devices as LUNs 7 and 9 on four targets of host2, the virtual adapter as host6. The shape of the output is the same, and presumably that is why the notes kept it |
In the plain example the two LUNs of the standby array became /dev/sdc and /dev/sdd next to /dev/sda and /dev/sdb of the main array. Because the standby array is a mirror of the main one, this is the "two arrays" state that problem 1 in RDAC problems and LUN removal removes again.
Checked against sg3_utils 1.49 and Red Hat Enterprise Linux 10
| As built | Today |
|---|---|
hot_add as a link to mppBusRescan | Confirmed by the package readme: "hot_add is a symbolic link to mppBusRescan". The same readme says "the Linux RDAC driver doesn't support LUN deletion", which sits oddly next to the -d option that removes unmapped or disconnected devices; I read it as the driver not handling a LUN that disappears under it, which is what problem 2 in RDAC problems and LUN removal works around |
| the driver's own rescan of the HBAs and the virtual adapter | Without RDAC the generic tools do it: rescan-scsi-bus.sh from sg3_utils (script version 20260526 in the current tree; sg3_utils release 1.49), which still writes to /sys/class/scsi_host/hostN/scan, is what SUSE documents; scsi-rescan is a Red Hat and Fedora symlink to it. Red Hat's current guide shows only echo 1 > /sys/block/sdX/device/rescan after a LUN resize and issue_lip |
mppBusRescan -c for a changed capacity, -d for removal | echo 1 > /sys/block/sdX/device/rescan and echo 1 > /sys/block/sdX/device/delete in the Red Hat Enterprise Linux 9 and 10 guides |
| RDAC itself | Discontinued with SANtricity OS 11.25; the arrays' line continues as NetApp E-Series with DM-Multipath and scsi_dh_rdac |