System information

To change the R/W state, use the following procedure:
Pro ced u re 25.7. Ch an g e t h e R /W st at e
1. To move the device from RO to R/W, see step 2.
To move the device from R/W to RO, ensure no further writes will be issued. Do this by
stopping the application, or through the use of an appropriate, application-specific action.
Ensure that all outstanding write I/Os are complete with the following command:
# bl o ckd ev --fl ushbufs /d ev/device
Replace device with the desired designator; for a device mapper multipath, this is the entry for
your device in d ev/mapper. For example, /d ev/mapper/mpath3.
2. Use the management interface of the storage device to change the state of the logical unit
from R/W to RO, or from RO to R/W. The procedure for this differs with each array. Consult
applicable storage array vendor documentation for more information.
3. Perform a re-scan of the device to update the operating system's view of the R/W state of the
device. If using a device mapper multipath, perform this re-scan for each path to the device
before issuing the command telling multipath to reload its device maps.
This process is explained in further detail in Section 25.14.4.1, “ Rescanning logical units .
25.1 4 .4 .1 . Rescanning lo gical unit s
After modifying the online logical unit Read/Write state, as described in Section 25.14.4, Changing
the Read/Write State of an Online Logical Unit” , re-scan the logical unit to ensure the system detects
the updated state with the following command:
# echo 1 > /sys/bl o ck/sd X/d evi ce/rescan
To re-scan logical units on a system that uses multipathing, execute the above command for each sd
device that represents a path for the multipathed logical unit. For example, run the command on sd1,
sd2 and all other sd devices. To determine which devices are paths for a multipath unit, use
mul ti path -11, then find the entry that matches the logical unit to be changed.
Examp le 25.18. Use o f t h e mul ti path -11 co mman d
For example, the mul ti path -11 above shows the path for the LUN with WWID
36001438005deb4710000500000640000. In this case, enter:
# echo 1 > /sys/bl o ck/sd ax/d evi ce/rescan
# echo 1 > /sys/bl o ck/sd ay/d evi ce/rescan
# echo 1 > /sys/bl o ck/sd az/d evi ce/rescan
# echo 1 > /sys/bl o ck/sd ba/d evi ce/rescan
25.1 4 .4 .2 . Updat ing t he R/W st at e o f a m ult ipat h de vice
If multipathing is enabled, after rescanning the logical unit, the change in its state will need to be
reflected in the logical unit's corresponding multipath drive. Do this by reloading the multipath device
maps with the following command:
Chapt er 2 5. O nline St orag e Manag ement
193