HP Serviceguard Extended Distance Cluster for Linux A.12.00.00 Deployment Guide, March 2014

A Managing an MD Device
This chapter includes additional information on how to manage the MD device. For the latest
information on how to manage and MD device, see The Software-RAID HOWTO manual available
at http://www.tldp.org/HOWTO/Software-RAID-HOWTO.html.
Following are the topics discussed in this chapter:
“Viewing the Status of the MD Device (page 49)
“Stopping the MD Device (page 49)
“Starting the MD Device (page 50)
“Removing and Adding an MD Mirror Component Disk” (page 50)
“Speeding up MD Device Builds and Re-syncing (page 51)
“Enabling and Disabling Write Intent Internal Bitmap (page 52)
A.1 Viewing the Status of the MD Device
After creating an MD device, you can view its status. By doing so, you can remain informed of
whether the device is clean, up and running, or if there are any errors.
To view the status of the MD device, run the following command on any node:
cat /proc/mdstat
Immediately after the MD devices are created and during some recovery processes, the devices
undergo a re-mirroring process. You can view the progress of this process in the /proc/mdstat
file. Following is the output you will see:
[root@dlhct1 ~]# cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sde[2] sdf[0]
9766784 blocks [2/1] [U_]
[=>...................] recovery = 8.9% (871232/9766784) finish=2.7min
speed=54452K/sec
unused devices: <none>
NOTE: A status report obtained using the cat /proc/mdstat command shows the MD device
name and the actual device names of the two MD component devices. It does not show the persistent
device names.
After you create an MD device, you can view the status of the device, stop and start the device,
add and remove a mirror component from the MD device.
A.2 Stopping the MD Device
After you create an MD device, it begins to run. You need to stop the device and add the
configuration into the raid.conf file. To stop the MD device, run the following command:
# mdadm -S <md_device name>
When you stop this device, all resources that were previously occupied by this device are released.
Also, the entry of this device is removed from the /proc/mdstat file.
A.1 Viewing the Status of the MD Device 49