You are not logged in.

#1 2009-12-29 09:21:02

jni
Member
Registered: 2009-10-30
Posts: 36

[solved] mdadm unable to find devices

Hi,

Ok, so I've search everywhere, followed the wikis and all that and i've been working on this for 8 hours, so i figured i could use some help (yea i'm stubborn and like learning by myself tongue)

Dont tell me that kind of setup is silly, i just wanna do this to learn more about raid/lvm installs, so it's just for fun smile

Alright, what i have :
-partitions on sda and sdb are clones, so i wanna get :
          sda|b1 to /boot in raid1
          sda|b2 as swap in raid1
          sda|b5 to / in raid0
          sda|b6 to /home in raid0
          sda|b7 to /var in raid0
-Also have a lvm thing in /dev/array/root, as suggested in the wiki.

I followed to wiki almost to the letter to do this, and it didn't work. I fixed a kernel panic and some other stuff aftwards, so now i get "mdadm: no devices found for /dev/md0" (same till md4, so none are created), then obviously grub fails at booting when it tries to load root=/dev/md2...

I have added raid1 and raid0 to the modules in rc.conf and /etc/mkinitcpio.conf and added lvm2 and mdadm to the HOOKS. I then created mdadm.conf with "mdadm -D --scan >> /etc/mdadm.conf" and added "DEVICE /dev/sda* /dev/sdb*" on top of it (also tried with DEVICE partitions with no more luck). Finally, i recreated the image with mkinitcpio -p kernel26 with success.

I tried a few things from here and there, without luck again. Now i really am out of ideas on what to try next. I did everything in the wiki for raid and lvm and in the mkinitcpio one, and nothing seemed to have done it.

It's getting late here, and i been working on that for about 8h as i said, so sorry if there is any information missing. If you need any more information, just ask and i'll provide it as soon as i wake up.

Thanks in advance for the help and have a good night,
Jni

Last edited by jni (2009-12-29 17:33:01)

Offline

#2 2009-12-29 15:56:29

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: [solved] mdadm unable to find devices

Perhaps you can determine the status of the raid arrays with the following codes:

 cat /proc/mdstat
/etc/mdadm.conf

To load the raid(s) at boot, /etc/mdadm.conf is used via mkinitcpio as you are probably aware.

I can see you are having "fun" with a new toy!!!


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#3 2009-12-29 16:45:32

jni
Member
Registered: 2009-10-30
Posts: 36

Re: [solved] mdadm unable to find devices

I wish i could cat /proc/mdstat, but the recovery console is not working at all =/ I just can't type and have to do an hard-reboot (hold the power button lol). I did use mdadm.conf right (i think) and remade the image with

mkinitcpio -p kernel26

, but it didn't help. If i boot with the arch cd i can do

mdadm --assemble /dev/md0 /dev/sda1 /dev/sdb1
vgscan
vgchance -ay
mount /dev/array/root /mnt

then like the wiki suggests, and that works fine. I can cd to it and modify files and all (on every md*) without issues. So i'm guessing the arrays are in good shape, but somehow mdadm can't pick up the partitions to use while booting =/

Is there a way i cud make this recovery console work to further diagnostic this? (i.e. is this a known bug with a known solution? =P)

Thanks again for your time,
Jni

Offline

#4 2009-12-29 17:20:24

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: [solved] mdadm unable to find devices

The only thing I can remark about is that the boot in raid systems has to be a raid 1 device in order that grub be responsive.

I haven't tried a raid system with partitioned devices so my experience is limited.

Some of the raid info in wikis is confusing, mixing LVM and Raid seems counter-productive.
Perhaps starting with a raid1 system alone may get you running...then add a raid0 afterwards.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#5 2009-12-29 17:32:42

jni
Member
Registered: 2009-10-30
Posts: 36

Re: [solved] mdadm unable to find devices

@lilsirecho : /boot was in raid1, since grub doesn't support raid0 on that.

I did successfully mix LVM with raid with the configuration posted above (just for experimental purpose, again), and i fixed my problem. Don't ask my why it works that way tho... here's what i did (and think that should be added to the wiki) :

- In mdadm.conf, using DEVICE partitions = fail, using DEVICE /dev/sda* /dev/sdb* = fail, using both together = win (go figure... i never understood that one)

- I redid mkinitpcio -p kerne26 to make the image usable

- After a reboot, i saw that md's were created, but then had a kernel panic at init saying it tried to mount root (hd9,2) (again, dont ask me where it got this lol). i changed from root=/dev/md2 to root=/dev/disk/by-uuid/blabla and added rootfstype=reiserfs (which isn't mentionned in the wiki, but i figured it could be useful, no idea if it did make it work, since i did both changes at once)

- Rebooted, and everything went well.

Topic marked as solved. Thanks for your time! w000t... 8h to install this, that was long! lol
Jni

Offline

Board footer

Powered by FluxBB