I built a RAID-1 with two hard drives using mdadm. Command used was:

mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb /dev/sdc

it went fine, I create partition table and partitions in it, mounted put some files there. Then I rebooted and realized I did not update mdadm.conf. How do I get my RAID back without losing data?

Update: results of --examine and --assemble commands:

# mdadm --examine /dev/sdb
   MBR Magic : aa55
Partition[0] :   4294967295 sectors at            1 (type ee)

# mdadm --assemble /dev/md0 /dev/sdb /dev/sdc
mdadm: Cannot assemble mbr metadata on /dev/sdb
mdadm: /dev/sdb has no superblock - assembly aborted

Does it make any difference that I created RAID on whole device instead of single partition?


If it were me I would do something like this.

  • Run the examine command against one of the member drives/partitions: mdadm --examine /dev/sdc`
  • Look for the Array UUID value.
  • Update your mdadm.conf with the array UUID value.

Something like this, using your UUID.

ARRAY /dev/md/0 metadata=1.2 UUID=326e64b6:1af3dfb4:e1fc5d41:ebd329b0 
  • See my update. There is no UUID in --examine output.
    – n0rd
    Feb 27 '14 at 2:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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