G.3.2 Repairing the RAID Arrays
After partitioning the disks, you can repair the two logical RAID arrays:
-
/dev/md0
contains/dev/disk/by-hba-slot/s0p1
and/dev/disk/by-hba-slot/s1p1
. It is mounted as/boot
. -
/dev/md2
contains/dev/disk/by-hba-slot/s0p2
and/dev/disk/by-hba-slot/s1p2
. It is mounted as/
(root).
Caution:
Do not dismount the /dev/md
devices, because that action shuts down the system.
To repair the RAID arrays:
-
Remove the partitions from the RAID arrays:
# mdadm /dev/md0 -r detached # mdadm /dev/md2 -r detached
-
Verify that the RAID arrays are degraded:
# mdadm -Q –-detail /dev/md0 # mdadm -Q –-detail /dev/md2
-
Verify that the degraded file for each array is set to 1:
# cat /sys/block/md0/md/degraded 1 # cat /sys/block/md2/md/degraded 1
-
Restore the partitions to the RAID arrays:
# mdadm –-add /dev/md0 /dev/disk/by-hba-slot/snp1 # mdadm –-add /dev/md2 /dev/disk/by-hba-slot/snp2
-
Check that resynchronization is started, so that
/dev/md2
is in a state of recovery and not idle:# cat /sys/block/md2/md/sync_action repair
-
To verify that resynchronization is proceeding, you can monitor the
mdstat
file. A counter identifies the percentage complete.# cat /proc/mdstat Personalities : [raid1] md0 : active raid1 sdb1[1] sda1[0] 204736 blocks [2/2] [UU] md2 : active raid1 sdb2[2] sda2[0] 174079936 blocks [2/1] [U_] [============>........] recovery = 61.6% (107273216/174079936) finish=18.4min speed=60200K/sec
The following output shows that synchronization is complete:
Personalities : [raid1] md0 : active raid1 sdb1[1] sda1[0] 204736 blocks [2/2] [UU] md2 : active raid1 sdb2[1] sda2[0] 174079936 blocks [2/2] [UU] unused devices: <none>
-
Display the content of /etc/mdadm.conf:
# cat /etc/mdadm.conf # mdadm.conf written out by anaconda DEVICE partitions MAILADDR root ARRAY /dev/md0 level=raid1 num-devices=2 UUID=df1bd885:c1f0f9c2:25d6... ARRAY /dev/md2 level=raid1 num-devices=2 UUID=6c949a1a:1d45b778:a6da...
-
Compare the output of the following command with the content of /etc/mdadm.conf from Step 7:
# mdadm --examine --brief --scan --config=partitions
-
If the UUIDs in the file are different from UUIDs in the output of the
mdadm
command:-
Open /etc/mdadm.conf in a text editor.
-
Select from ARRAY to the end of the file, and delete the selected lines.
-
Copy the output of the command into the file where you deleted the old lines.
-
Save the modified file and exit.
-
-
Complete the steps in "Formatting the HDFS Partition of an Operating System Disk".