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 have created a Raid0 and it works as I expect it. The the array file is created at /dev/md0. I want this to be mounted automatically by adding this line at the end of the /etc/fstab file :

/dev/md0 /mnt/storage ext4 noatime,commit=60,data=writeback,nodiratime,journal_async_commit,nouser_xattr 0 0

and this Line at the end of the /etc/mdadm/mdadm.conf:

ARRAY /dev/md0 metadata=1.2 name=lil-RIKO:lil-RIKO UUID=6016d5e4:6e42cb97:6b2a8e6e:098c1982

In Boot time, I saw that /mnt/storage was being waited to be mounted and provide two options : to Skip ... or to Ma... I forgot what its says. I waited so long that made think something is wrong. I went into the "maintenance mode" which is a root shell then I quickly checked presence of /dev/md0 file. The File wasn't there, only /dev/md127. I tried to mount that file instead and it complained about not finding a superblock. I manually mounted the raid via mdadm --assemble /md0after removing the /dev/md127 file via mdadm --stop /dev/md* and I continued booting. Next reboot, I experienced the same issue.

How come the raid wasn't get automatically mounted? There was no presence of /dev/md0 at boot time and I was able to mount it manually.

EDIT1: I have managed to "merge" it into one which is /dev/md127 by removing a disk , The problem still occurs but when I issue ths cat /proc/mdstat I got this:

md127 : inactive sdc[1](S) sdb[0](S)
      7830528 blocks super 1.2

This means (I think ) the raid is not yet activated. But when I reattached it it comes active like this:

md127 : active raid0 sdc1[1] sdb1[0]
      7830528 blocks super 1.2 512k chunks

What went wrong this time ?

share|improve this question

3 Answers 3

up vote 1 down vote accepted

Hopefully you already found an answer; if not, I just went through this, and the short answer is to edit your array definitions at /etc/mdadm/mdadm.conf; basically remove anything other than the /dev/md* and UUID= info (delete metadata, name, etc). On reboot, you should no longer have the md127, md126, etc problem with your arrays.

So based on your line above, change

ARRAY /dev/md0 metadata=1.2 name=lil-RIKO:lil-RIKO UUID=6016d5e4:6e42cb97:6b2a8e6e


ARRAY /dev/md0 UUID=6016d5e4:6e42cb97:6b2a8e6e
share|improve this answer

Did you remember to run update-initramfs after assembling the array as md0? if not, try stopping and re-assembling the array again and then doing so, i.e.

sudo mdadm --stop /dev/md127
sudo mdadm --assemble /dev/md0
sudo update-initramfs -u

This should make the initial root filesystem 'aware' of the array at boot time

share|improve this answer
Sorry but it did not work. Half of it seems to work because the md0 file is present but /dev/md127 is still present. There should be only one md* file which is /dev/md0 array that holds my 3 drives. Using cat /proc/mdstat : md0 : active raid0 sdc1[2] sdb3[1] ... md127 : active raid0 sdd1[0] –  user128712 Sep 8 '13 at 1:25
is that before or after rebooting? –  steeldriver Sep 8 '13 at 1:37
It is what happend after I reboot –  user128712 Sep 8 '13 at 1:46
Hmmm... you may need to do mdadm --remove /dev/md127 in between the --stop and the --assemble ? –  steeldriver Sep 8 '13 at 1:49
I have updated the post –  user128712 Sep 8 '13 at 5:04

I encountered a similar problem, mounting the md0 array in fstab fails with 'serious error encountered attempting to mount /mnt/md0' (or similar). Frigged around with this for an hour, couldn't get it to work. Checked UUID, /proc/mdstat, mdadm.conf etc, all seems ok.

Added nobootwait option to fstab so it doens't lock up the boot process (headless server)

Looks like a race condition to me, because issuing the mount command manually after boot works fine.

Workaround that works for me:

edit rc.local, add following line before exit 0

sleep 10 && mount -t auto /dev/md0 /mnt/md0

Sideeffect is that the mount appears 10 seconds later, but I can live with that. Without the sleep command, it didn't work.

Hope this helps someone.

share|improve this answer

Your Answer


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.