FEEDBACK
X

Recovering a software RAID after a failure

We decided to write a little note on the partition "fallout" from the software RAID 1

cat /proc/mdstat

In RAID activity we see the following:

Personalities : [raid1]

md2 : active raid1 sdb3[1]
34178176 blocks [2/1] [_U]
md1 : active raid1 sda2[0] sdb2[1]
19534976 blocks [2/2] [UU]
md0 : active raid1 sda1[0] sdb1[1]
240832 blocks [2/2] [UU]

The drive is alright according to S.M.A.R.T., there is nothing wrong noticed in the logs.

We'll try to recover. Mark the drive as failed:

mdadm /dev/md2 -f /dev/sda3

Remove it from the RAID 1

mdadm /dev/md2 -r /dev/sda3

And add it back to RAID 1

mdadm /dev/md2 -a /dev/sda3

mdadm: re-added /dev/sda3

Check the partition status after adding back to the array:

# mdadm —detail /dev/md2

Rebuilding is in process, Rebuild Status line: 21% complete