goldfisch.at-knowledgebase   (by peter pilsl)


  ubuntu : mdadm: error opening /dev/md0: No such file or directory

keywords : ubuntu raidtools raidtools2 mdadm MAKEDEV

After a ubuntu (7.10) - reboot the machine suddenly hat big troubles coming up. It hang during startup and when I pressed ctrl-alt-del to reboot it, it suddenly continued booting, but my raid /dev/md0 was not assembled although /proc/mdstat was active, but empty.


examination with mdadm (see http://www.goldfisch.at/knowwiki/basics/mdadm)showed that the raid itself was fine and that md0 was a raid consisting of sdc2 and sdb2, and so I tried to start the raid manually:

mdadm -A /dev/md0 /dev/sdc2 /dev/sdb2

I got the error:

mdadm: error opening /dev/md0: No such file or directory


A look in /dev showed that there was no md-file at all !!

I dont know how they vanished and to be frank I dont know which package provided them in first place. raidtools or raidtools2 are depreceated for quite some time now.


I then did two things and this solved the problem. I am not sure which of the two really did solve the problem:

i) create /etc/mdadm/mdadm.conf

although I could reboot fine before without having such a mdadm.conf I create one now. Its very simple, cause there is a sript scanning all partitions and creating the conf-file:

#/usr/share/mdadm/mkconf>/etc/mdadm/mdadm.conf


ii) create the /dev/md-files manually


#cd /dev
#./MAKEDEV
udev active, devices will be created in /dev/.static/dev/
# cp .static/dev/md* ./

This created loads of md-files (md0,md1...md28) but after next reboot all where vanished again but the md0-file. And the warning while running MAKDEV : "udev active ... " also suggest that one cannot simply copy device-files in a mounted linux-thing like udev. So maybe the mdadm.conf-approach in i) is the one that solved my problem. But I dont know.

assembling the array then did not work also cause mdadm complained about not finding a raid-superblock on /dev/sdc2, but sdb2 and sdc2 wherent even listed in /dev/disk/by-uuid and so I decided its time for a full reboot anyway and then ubuntu came up without any problem. Raid assembled, running and even in full sync.










peter at 2008-03-29 (updated 2008-03-29)

serial : 380


If you found any nonsense in this entry or want to see important improvements, I would appreatiate to receive your comments at knowledge@goldfisch.at

disclaimer : all these entries are part of my very private knowledgebase that I created while solving problems. Many solutions are taken from other webpages or from usenet. There is no warranty for this entries of course. Some of the articles are even stupid and one day you might even find the name of my prefered pizza-service in here, cause I always forget about it. Remember : This is my knowledgebase. If you need professional support and are willing to pay for it just email me at pilsl@goldfisch.at
For enlightment take a look at http://leblogsportif.sportnation.at