HP Serviceguard Extended Distance Cluster for Linux A.12.00.00 Deployment Guide, March 2014
Example 1 Stopping the MD Device /dev/md0
To stop the MD device /dev/md0, run the following command:
[root@dlhct1 dev]# mdadm -S /dev/md0
Once you stop the device, the entry is removed from the/proc/mdstat file. Following is an
example of what the file contents will look like:
[root@dlhct1 dev]# cat /proc/mdstat
Personalities : [raid1]
unused devices: <none>
NOTE: This command and the other commands described subsequently are listed as they may
be used during cluster development and during some recovery operations.
A.3 Starting the MD Device
After you create an MD device, you would need to stop and start the MD device to ensure that it
is active. You would not need to start the MD device in any other scenario as this is handled by
the serviceguard-xdc software.
To start the MD device, run the following command:
# mdadm -A -R <md_device_name> <md_mirror_component_persistent_name_0>
<md_mirror_component_persistent_name_1>
Example 2 Starting the MD Device /dev/md0
To start the MD device /dev/md0, run the following command:
# mdadm -A -R /dev/md0 /dev/hpdev/sde /dev/hpdev/sdf1
Following is an example of what the /proc/mdstat file contents will look like once the MD is
started:
[root@dlhct1 dev]# cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sde[1] sdf[0]
9766784 blocks [2/2] [UU]
unused devices: <none>
A.4 Removing and Adding an MD Mirror Component Disk
There are certain failure scenarios, where you would need to manually remove the mirror component
of an MD device and add it again later. For example, if links between two data centers fail, you
would need to remove and add the disks that were marked as failed disks.
When a disk within an MD device fails, the /proc/mdstat file of the MD array displays a
message. For example:
[root@dlhct1 dev]# cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sde[2](F) sdf[0]
9766784 blocks [2/1] [U_]
unused devices: <none>
In the message, the (F) indicates which disk has failed. In this example, the sde[2] disk has
failed.
In such a scenario, you must remove the failed disk from the MD array. You need to determine the
persistent name of the failed disk before you remove it from the MD array. For this example, run
the following command to determine the persistent name of the disk:
# udevinfo -q symlink -n sdc1
Following is a sample output:
50 Managing an MD Device