LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 09-27-2007, 05:45 AM   #1
TL_CLD
Member
 
Registered: Sep 2006
Posts: 342

Rep: Reputation: 34
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
 
Old 09-27-2007, 09:20 AM   #2
TL_CLD
Member
 
Registered: Sep 2006
Posts: 342

Original Poster
Rep: Reputation: 34
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
 
Old 09-27-2007, 10:34 AM   #3
MQMan
Member
 
Registered: Jan 2004
Location: Los Angeles
Distribution: Slack64 13.37
Posts: 536

Rep: Reputation: 36
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.
 
Old 09-27-2007, 11:23 AM   #4
TL_CLD
Member
 
Registered: Sep 2006
Posts: 342

Original Poster
Rep: Reputation: 34
Quote:
Originally Posted by MQMan View Post
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
 
Old 09-27-2007, 11:24 AM   #5
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,379

Rep: Reputation: Disabled
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
 
Old 09-27-2007, 11:29 AM   #6
TL_CLD
Member
 
Registered: Sep 2006
Posts: 342

Original Poster
Rep: Reputation: 34
Quote:
Originally Posted by MQMan View Post
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
 
Old 09-27-2007, 11:33 AM   #7
TL_CLD
Member
 
Registered: Sep 2006
Posts: 342

Original Poster
Rep: Reputation: 34
Quote:
Originally Posted by Alien Bob View Post
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
 
Old 09-27-2007, 02:35 PM   #8
TL_CLD
Member
 
Registered: Sep 2006
Posts: 342

Original Poster
Rep: Reputation: 34
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?
 
Old 09-27-2007, 03:03 PM   #9
MQMan
Member
 
Registered: Jan 2004
Location: Los Angeles
Distribution: Slack64 13.37
Posts: 536

Rep: Reputation: 36
Quote:
Originally Posted by TL_CLD View Post
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.
 
Old 09-27-2007, 03:49 PM   #10
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,379

Rep: Reputation: Disabled
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
 
Old 09-27-2007, 04:15 PM   #11
TL_CLD
Member
 
Registered: Sep 2006
Posts: 342

Original Poster
Rep: Reputation: 34
Quote:
Originally Posted by Alien Bob View Post
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
 
Old 09-27-2007, 07:25 PM   #12
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 227Reputation: 227Reputation: 227
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
 
Old 09-28-2007, 11:46 AM   #13
TL_CLD
Member
 
Registered: Sep 2006
Posts: 342

Original Poster
Rep: Reputation: 34
Just to report back: It worked like a charm!


Thomas
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
software raid 5 + LVM and other raid questions slackman Slackware 5 05-09-2007 03:58 PM
MS Windows after Slack 11 plus RAID 1 gargamel Slackware 2 11-29-2006 03:34 PM
ATA RAID with Slack. trouby Slackware 4 01-30-2004 10:45 PM
Installing slack 9.1 on SCSI RAID cybrjackle Slackware 0 12-05-2003 11:51 AM
Slack on an ATA100/RAID controller BrandonJG Slackware 4 09-07-2002 08:51 PM


All times are GMT -5. The time now is 01:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration