-   Linux - Software (
-   -   mdadm: no devices ... were found after RAID0 install (

hedpe 06-28-2007 02:07 AM

mdadm: no devices ... were found after RAID0 install

I used the minimal server CD to install Feisty Fawn and create a software RAID0.

I was having problems with it actually creating and deleting the RAIDS like I wanted it to, so I manually created them by dropping to a shell.

I used the shell to configure my disks and create the raids and then dropped back to the Ubuntu console setup and it recognized my RAIDs and disks.

Heres what it looked like:

RAID0 device 0
  525.3MB  f  swap        swap
RAID0 device 1
  318GB      f  reiserfs    /
SCSI7 (0,0,0)
    #1 primary  139.8MB  B  f  ext2    /boot
    #2 primary  263.2MB      K  raid
    #3 primary  159GB          K  raid
SCSI7 (0,1,0)
    #1 primary  139.8MB  B  f
    #2 primary  263.2MB      K  raid
    #3 primary  159GB          K  raid

So I had a swap, a root, and a boot since a boot is needed to bootstrap the RAID.

The rest of the installation went great, I had no errors, nothing. Grub installed, it was fine.

So then I remove the CD and reboot, it gets past grub and begins to boot (which means my /boot worked, I guess) and I get:


Starting up ...
Loading, please wait...
mdadm: No devices listed in conf file were found.

and then it pauses for about 2 minutes, and drops me to BusyBox (initramfs)

I'm totally clueless here. I don't even know where it keeps the mdadm configuration ... should it be kept on boot? How else does it know what my RAID setup is? Does it auto detect it somehow? I managed to run a RAID0 in Gentoo successfully using these same disks and setup.... I'm just not sure where the config is to maybe look at it or even where to begin debugging this.

I'd greatly appreciate any help...


jschiwal 06-28-2007 03:43 AM

The default is /etc/mdadm.conf. If that doesn't exist, it tries /etc/mdadm/mdadm.conf. However, since /etc is on the array it won't be able to find it. What should happen is that the array is assembled by the kernel from the superblock information.

You could try "mdadm --examine --scan". It may start with the devices from /proc/partitions, assume they are raid elements as a starting point and examine them. The output could be redirected to /boot/mdadm.conf which could then be used as the config file, to get you started and be able to access your root partition.
An example in man mdadm gives:

echo 'DEVICE /dev/hd[a-z] /dev/sd*[a-z]' > mdadm.conf
mdadm --examine --scan --config=mdadm.conf >> mdadm.conf

I wouldn't recommend using raid0 however. While it can speed access, if one of the drives goes bad, the array goes bad.

hedpe 06-28-2007 08:32 AM

thanks for the response!

I am going to try and boot a live cd and get the mdadm.conf by doing an --examine --scan

if i put it on /boot, will it actually read it though?

hedpe 06-28-2007 11:38 AM

is there any way to get it to dump me some more output so I can figure out whats going on? is it possible that its mounting root properly and just not finding an mdadm config?

jschiwal 06-28-2007 02:38 PM

If you include the option, to the mdadm command, where you indicate where the config file is. I was suggesting a way to get started.

I'm not home now. I had done something crazy on my laptop. I created three files for partitions, used losetup to map them to loop devices, and then assembled a raid-5 array. I wanted to use the mdadm command a bit before responding. The output of
mdadm --examine --scan
was shorter than I expected.

There is also something in /proc where the kernel tracks md devices.
I think your game plan should be to see if the kernel sees the raid devices and get mdadm in use that information when assembling the devices, since it can't read /etc/mdadm.conf yet. That should be happening automatically by the kernel using the persistant superblocks, but a little research may be needed. Does raid0 even use them, I don't know.

All times are GMT -5. The time now is 12:19 AM.