LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slack 11 and 12 RAID questions (https://www.linuxquestions.org/questions/slackware-14/slack-11-and-12-raid-questions-587692/)

TL_CLD 09-27-2007 04:45 AM

Slack 11 and 12 RAID questions
 
Hey all,

During all my time with Slackware 11 I've build my raids during install using the "good" old raidtools. It's worked like a charm.

Now with Slackware 12 I no longer have raidtools available during install, so I'm forced to use mdadm instead. So far I like it quite well. It's a heck of a lot easier to get those raids up and running without having to write a lot of stuff in /etc/raidtab. :)

But!

How do I go about managing my raids now? I've read that mdadm doesn't really need a .conf file, but what happens then if a disk fails and I need to rebuild?

Any and all mdadm tricks are more than welcome. What's considered good practice when maintaining raids using mdadm.

Regards,
Thomas

TL_CLD 09-27-2007 08:20 AM

Ok, after my initial success with the whole mdadm RAID creation, I've run into a boot issue.

Slackware 12
RAID level 1
/ on /dev/md0
/var on /dev/md1
/home on /dev/md2

When I switch from hugesmp.s to generic, it wont boot. I've done the whole lilo/mkinitrd dance:

$ mkinitrd -c -k 2.6.21.5 -m ext3 -f ext3 -r /dev/md0
$ lilo

And I have of course added the appropriate information to lilo.conf.

It starts well with the classic lilo menu, where the new generic kernel shows up. I select it, and booting begins. Then after a while it reaches a point where this happens:

mount: Mounting /dev/md0 on /mnt failed
ERROR: No /sbin/init found on rootdev

And then it just sits there.

I never had this issue with Slackware 11 using raidtools and running the exact same raidsetup. I must be doing something wrong, I just can figure out what. It looks as if /dev/md0 doesn't exist during boot, and seeing as / is mounted on /dev/md0, that would indeed be a problem.

Any advice?

:)
Thomas

MQMan 09-27-2007 09:34 AM

Are there any additional modules you have to include when running mkinitrd to support the raid. You've only added support for a couple of filesystems.

Cheers.

TL_CLD 09-27-2007 10:23 AM

Quote:

Originally Posted by MQMan (Post 2905450)
Are there any additional modules you have to include when running mkinitrd to support the raid. You've only added support for a couple of filesystems.

Cheers.

That's actually a really good question. I must admit I have no clue.

Anybody?

Thomas

Alien Bob 09-27-2007 10:24 AM

This page describes (in german) how to modify mkinitrd and your initrd's "init" script so that it builds your RAID array on boot: http://apropos.wordpress.com/2007/07...-raid-und-lvm/

But this support for software-RAID should really be added to the Slackware mkinitrd package in the next slackware-current round.

Eric

TL_CLD 09-27-2007 10:29 AM

Quote:

Originally Posted by MQMan (Post 2905450)
Are there any additional modules you have to include when running mkinitrd to support the raid. You've only added support for a couple of filesystems.

Cheers.

Looking at the config file for generic kernel 2.6.21.5 I spot this:

#
# Multi-device support (RAID and LVM)
#
CONFIG_MD=y
CONFIG_BLK_DEV_MD=y
CONFIG_MD_LINEAR=y
CONFIG_MD_RAID0=y
CONFIG_MD_RAID1=y
CONFIG_MD_RAID10=y
CONFIG_MD_RAID456=y
CONFIG_MD_RAID5_RESHAPE=y
CONFIG_MD_MULTIPATH=y
CONFIG_MD_FAULTY=m
CONFIG_BLK_DEV_DM=y
# CONFIG_DM_DEBUG is not set
CONFIG_DM_CRYPT=y
CONFIG_DM_SNAPSHOT=m
CONFIG_DM_MIRROR=m
CONFIG_DM_ZERO=m
CONFIG_DM_MULTIPATH=m
CONFIG_DM_MULTIPATH_EMC=m

Does that not mean that RAID support is build into the kernel already? Or?

Regards,
Thomas

TL_CLD 09-27-2007 10:33 AM

Quote:

Originally Posted by Alien Bob (Post 2905502)
This page describes (in german) how to modify mkinitrd and your initrd's "init" script so that it builds your RAID array on boot: http://apropos.wordpress.com/2007/07...-raid-und-lvm/

But this support for software-RAID should really be added to the Slackware mkinitrd package in the next slackware-current round.

Eric

My german is, to put it mildly, pretty bad, but thank you for the find!

As far as I can see, it looks as if the problem is due to mdadm? /dev/md0 simply does not exist at this point in time, because it hasn't been assembled by mdadm yet?

How this worked with raidtools is beyond me.

I do though agree with you: This REALLY should be fixed as fast as possible.

:)
Thomas

TL_CLD 09-27-2007 01:35 PM

Hmm, seeing as it works with the huge kernel, couldn't I just compile my own with all the relevant modules loaded in the kernel?

MQMan 09-27-2007 02:03 PM

Quote:

Originally Posted by TL_CLD (Post 2905681)
Hmm, seeing as it works with the huge kernel, couldn't I just compile my own with all the relevant modules loaded in the kernel?

Yes, if you can work out which pieces are needed. But, then, if you could do that, all you'd have to do is add them to mkinitrd. :)

Cheers.

Alien Bob 09-27-2007 02:49 PM

OK after conferring with Patrick, PiterPUNK and Stuart Winter, this is the verdict:
Software RAID will work out of the box in Slackware (no initrd needed) if the following conditions are met:

- The raid drivers are compiled into the kernel (no modules!)
- The partition types are set to "Linux RAID Autodetect" (type 'fd')

Note that with RAID drivers as modules, the RAID autodetection by the kernel will fail.

Cheers, Eric

TL_CLD 09-27-2007 03:15 PM

Quote:

Originally Posted by Alien Bob (Post 2905762)
OK after conferring with Patrick, PiterPUNK and Stuart Winter, this is the verdict:
Software RAID will work out of the box in Slackware (no initrd needed) if the following conditions are met:

- The raid drivers are compiled into the kernel (no modules!)
- The partition types are set to "Linux RAID Autodetect" (type 'fd')

Note that with RAID drivers as modules, the RAID autodetection by the kernel will fail.

Cheers, Eric

You people simply rock!

Slackware and its community is miles above and beyond what most other distros offer.

I will compile a new kernel and report back. :)

Sincerely,
Thomas

mRgOBLIN 09-27-2007 06:25 PM

Might I add a shameless plug to my Raid Howto. It may still be of some use to you.

http://www.userlocal.com/articles/ra...ackware-12.php

TL_CLD 09-28-2007 10:46 AM

Just to report back: It worked like a charm!

:)
Thomas


All times are GMT -5. The time now is 09:13 PM.