Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I recently upgraded a server from Fedora 6 to Fedora 14. In addition to the main hard drive where the OS is installed, I have 3 1TB hard drives configured for RAID5 (via software). After the upgrade, I noticed one of the hard drives had been removed from the raid array. I tried to add it back with mdadm --add, but it just put it in as a spare. I figured I'd get back to it later.

Then, when performing a reboot, the system could not mount the raid array at all. I removed it from the fstab so I could boot the system, and now I'm trying to get the raid array back up.

I ran the following:

mdadm --create /dev/md0 --assume-clean --level=5 --chunk=64 --raid-devices=3 missing /dev/sdc1 /dev/sdd1

I know my chunk size is 64k, and "missing" is for the drive that got kicked out of the array (/dev/sdb1).

That seemed to work, and mdadm reports that the array is running "clean, degraded" with the missing drive.

However, I can't mount the raid array. When I try:

mount -t ext3 /dev/md0 /mnt/foo

I get:

mount: wrong fs type, bad option, bad superblock on /dev/md0,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

and /var/log/messages shows:

EXT3-fs (md0): error: can't find ext3 filesystem on dev md0.

Does anyone have any ideas of what to try next?

share|improve this question
    
Have you tried mounting two of the three drives? I'm not sure if RAID-5 will work with just one of three drives. –  Diego Sevilla Jun 7 '11 at 20:14
    
Yeah, that's what I did with the mdadm --create command. You'll notice at the end I specified the three drives as "missing," "/dev/sdc1," and "/dev/sdd1." Also, mdadm --query --details /dev/md0 reports the array as "clean, degraded" which is what I would expect for a RAID5 array missing one drive. –  jstevej Jun 7 '11 at 20:25

1 Answer 1

You may got the missing on the wrong position. Only the correct position of the drives and missing will work. Just run:

mdadm --examine  /dev/sdb1

This will output (among other things) the information which number in the RAID is really missing. Look for the this line:

      Number   Major   Minor   RaidDevice State
this     0     253       13        0      active sync   /dev/dm-13

In this case, it is number 0 (=first device) and active as my RAID is online right now . Now you know wich drive should be specified as missing.

But you still have 2 choices: The order of the working drives may also need to be swapped. This information is lost, however, because it got overwritten by your reassembly try.

share|improve this answer
    
I tried your suggestion; in fact, I tried all 6 possible combinations of drive order (missing sdc1 sdd1, missing sdd1 sdc1, sdc1 missing sdd1, sdd1 missing sdc1, sdc1 sdd1 missing, sdd1 sdc1 missing), but all of them gave me the same mount error. –  jstevej Jun 8 '11 at 11:59

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.