Wed, 12 Apr 2006

Repairing a RAID5 software array (Debian Linux)

Posted by Ben Wed, 12 Apr 2006 19:35:00 GMT

RAID5 software arrays in Linux are very simple to setup and should run smoothly. Inevitably something will go wrong – but luckily that’s why we use RAID5 – there should be no data loss.

Software RAID HOWTO is the best reference.

Check the RAID

Identify the problematic disk [UU_]

mdadm --detail /dev/md0
cat /proc/mdstat

Remove failed disk

mdadm /dev/md0 -r /dev/hdg1

Add new disk

mdadm /dev/md0 -a /dev/hdg1
Once rebuilding has started you can check the status via /proc/mdstat (depending on the array size it may take quite a long time).
cat /proc/mdstat 
Personalities : [raid5] 
md0 : active raid5 hdg1[3] hdc1[0] hde1[1]
      488391680 blocks level 5, 128k chunk, algorithm 2 [3/2] [UU_]
      [>....................]  recovery =  0.8% (2098944/244195840) finish=205.3min speed=19648K/sec
unused devices: <none>
Trackbacks

Use the following link to trackback from your own site:
http://www.slashdotdash.net/articles/trackback/11

Comments

Leave a response

  1. J.Mihai about 1 year later:

    ARRAY /dev/md3 level=raid1 num-devices=2 UUID=d283bdbd:59f02745:4c4994b8:108272b3 devices=/dev/hdg1,/dev/hdi1 ARRAY /dev/md0 level=raid1 num-devices=2 UUID=d9eb7b7d:b28c104c:b4cd8d68:1bd6c74a devices=/dev/hdc5,/dev/hde5 ARRAY /dev/md1 level=raid1 num-devices=2 UUID=3806599e:2c4c79bf:a6f675bc:d44a4561 devices=/dev/hdc6,/dev/hde6

    Is it the same case ?

Comments