-   Linux - Software (
-   -   mdadm array doesn't assemble (

seaking1 03-01-2009 12:59 PM

mdadm array doesn't assemble
I have a system running fc10 and am setting up a software RAID array using mdadm. I have an array working in RAID 5 with 5 disks but after a reboot (or the devices are stopped in some other way) the array will not assemble with mdadm --assemble and with mdadm --auto-detect it builds it with 4 disks and a spare.

Could someone help me out?

Also when I use --examine on a device, it says there is no superblock and tells me nothing.


mesiol 03-02-2009 03:55 AM


are all partitions on the disks type fd?
Does mdadm work when you use it with the disk names attached like

mdadm --assemble --update=summaries  /dev/md0 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1

seaking1 03-02-2009 11:50 AM

I did find one drive that was not raid autodetect (fd) and fixed that. I am trying a rebuild now but that will take a long time to check.

I also wonder, is there a way I may prevent my drives from getting new names whenever I swap some out? Having them get their device names at boot time is quite difficult when you have an array set up using a specific list of devices and perhaps you added a few drives or something.

Thanks more.

mesiol 03-02-2009 12:28 PM


take a search at google for devlabel. This will give persistent devicenames for disks across reboots and replacements.

mesiol 03-02-2009 12:29 PM


i found a nice description how devlabel works here.

seaking1 03-02-2009 01:40 PM

When I try to rebuild with

mdadm --incremental --rebuild /dev/md0

it replies

no recognisable superblock on /dev/md0

Is there a way to rebuild the superblock or something?

mesiol 03-05-2009 12:03 AM



will add a device to an existing array. So i think your commandline is wrong, because you try to add /dev/md0 which is an existing array. Normally you would add additional disks to an array eg. for replacement.

seaking1 03-05-2009 09:48 PM


What is the syntax to rebuild an array?

Do md arrays function like real RAID 5 (in my case)? Initially I was trying to test by building array, physically removing drive, and rebuilding... but after removal of drive I could still mount up? Twice. I think this is strange, it did some live rebuild, in 5 seconds, without asking? I don't really what's up.

And do you know what's going on with all my superblock errors? Whenever I try a command to modify or view array it tells me about how it can't read superblock. I can now assemble the array directly though.

For removal of a drive would I use:
mdadm --manage /dev/md0 --remove /dev/sdb1

mesiol 03-06-2009 09:34 AM


not sure if i all understand right :)

Sure you can mount your RAID-5 while one disk is gone. This is the purpose of RAID :) Yes md devices works like real RAID.

It's correct to remove a disk with --remove. Did you also have add a new disk or re-add an existing one? You can use --add to add a new disk or --re-add to add a disk previously removed.

The superblock errors occurs in case of incorrect usage. For example when you try to access the md-device istead of physical disk (in your --incremental for example you tried to access /dev/md0, but you have to use a physical devicename like /dev/sdb1).

All times are GMT -5. The time now is 08:34 PM.