Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I accidentally unplugged my eSATA cable while rerouting some cables behind my desk and knocked my RAID array offline.

I believe the drives are fine, but they show up as state "removed" now, how can I reinitialize the array?

mdadm --detail /dev/md1 shows:

/dev/md1:
        Version : 00.90
  Creation Time : Wed Oct 20 20:00:41 2010
     Raid Level : raid5
     Array Size : 5860543488 (5589.05 GiB 6001.20 GB)
  Used Dev Size : 1953514496 (1863.02 GiB 2000.40 GB)
   Raid Devices : 4
  Total Devices : 4
Preferred Minor : 1
    Persistence : Superblock is persistent

    Update Time : Mon Oct  3 18:39:41 2011
          State : clean, degraded
 Active Devices : 0
Working Devices : 0
 Failed Devices : 4
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 64K

    Number   Major   Minor   RaidDevice State
       0       0        0        0      removed
       1       0        0        1      removed
       2       0        0        2      removed
       3       0        0        3      removed

       4       8       32        -      faulty spare
       5       8       48        -      faulty spare
       6       8       16        -      faulty spare
       7       8       64        -      faulty spare

And here's mdstat:

Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md1 : active raid5 sdc[4](F) sdd[5](F) sdb[6](F) sde[7](F)
      5860543488 blocks level 5, 64k chunk, algorithm 2 [4/0] [____]

unused devices: <none>
share|improve this question

1 Answer 1

up vote 12 down vote accepted

It looks a bit like you managed to knock off all four drives from the array? I think you get some kind of achievement badge. :-)

You should be able to just re-add them to the array:

sudo mdadm /dev/md1 --re-add /dev/sd[bcde]

Then watch cat /proc/mdstat to see it rebuild them.

See man mdadm for more.

share|improve this answer
2  
Run watch cat /proc/mdstat for a live status on the rebuild. I'll warn you: it's like watching paint dry. –  Oli Oct 4 '11 at 12:21
1  
Lies! Watching cat /proc/mdstat is a past-time of mine. It's especially great if you do "-d" and "-n 0.1". –  popey Oct 4 '11 at 20:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.