Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have mounted Ubuntu server 12 on 2 drives with software raid. I have raid 1 on 4 partitions and raid 0 on swap. Every time I reboot the system now a different partition from the 2 appears as active in the raid and the other as removed.

 cat /proc/mdstat 
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md0 : active raid1 sdb1[1]
      48796672 blocks super 1.2 [2/1] [_U]

md4 : active raid1 sda6[2]
      386788800 blocks super 1.2 [2/1] [U_]

md2 : active raid1 sdb3[1]
      146349504 blocks super 1.2 [2/1] [_U]

md3 : active raid1 sdb5[1]
      390497216 blocks super 1.2 [2/1] [_U]

md1 : active raid0 sda2[0] sdb2[1]
      7806976 blocks super 1.2 512k chunks

and sudo mdadm --detail /dev/md4 shows

  Number   Major   Minor   RaidDevice State
       2       8        6        0      active sync   /dev/sda6
       1       0        0        1      removed

Any idea of why this is happening and how I can fix it?

share|improve this question
Your terminology is wrong - you use the term partition while meaning raid device... anyway, it seems to me, you have only 1 device in each RAID device which is wrong... you need to properly build the raid and wait for the synchronization to finish. As my shot in the flying bird, you need to add sda1 to the md0 RAID and wait for the sync to finish. Then your configuration should persist after reboot –  Kamil ┼árot Nov 12 '12 at 15:17
Thanks,you are right. Is there a way to stop this from happening when I reboot the server? or to make it automatically... –  gdogaru Nov 12 '12 at 15:42
as I wrote in my first comment: for each RAID device find the missing device. Carefully check if it's really the device you want to use and the partition has correct (the same) size as member of RAID - all data on this device will be purged! Run command similar to following - CAUTION: make sure the devices correspond with your setup: mdadm --manage /dev/md0 --add /dev/sda1 –  Kamil ┼árot Nov 12 '12 at 18:56

Your Answer


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

Browse other questions tagged or ask your own question.