LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   software RAID on the root partition (http://www.linuxquestions.org/questions/linux-hardware-18/software-raid-on-the-root-partition-216410/)

spuzzzzzzz 08-11-2004 07:35 PM

software RAID on the root partition
 
I'm trying to set up software raid on my root partition, but I keep getting kernel panics when i boot.
Here's my setup:
/dev/sda1: boot partition
/dev/md0: raid0 swap partition consisting of /dev/sd[bcd]1
/dev/md1: raid0 /opt partition consisting of /dev/sd[abcd]2
/dev/md2: raid5 root partition consisting of /dev/sd[abcd]3

My SATA controller is Silicon image sil1114 and I have compiled the relevant module _into_ the kernel (ie. not as a module). I have compiled raid0 and raid5 support _into_ the kernel. I have compiled reiserfs support _into_ the kernel.

GRUB loads properly. I can select the appropriate entry and boot. The kernel detects my SATA drives:
Code:

Vendor: ATA Model: WDC WD1200JD-00H Rev: 08.0
Type: Direct-Access
Vendor: ATA Model: WDC WD1200JD-00H Rev: 08.0
Type: Direct-Access
Vendor: ATA Model: WDC WD1200JD-00H Rev: 08.0
Type: Direct-Access
Vendor: ATA Model: WDC WD1200JD-00H Rev: 08.0
Type: Direct-Access

I'm not sure if it detects the RAID arrays:
Code:

md: Autodetecting RAID arrays
md: autorun...
md: ...autorun DONE

It then fails with
Code:

VFS: Cannot open root device "md2" or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on unknown-block(0,0)

My append line is "root=/dev/md2". I have also tried "root=/dev/sda3" and "root=/dev/hda3"

Any suggestions? TIA

rjlee 08-12-2004 09:36 AM

I'm not sure of the specifics off-hand, but I recompiled the kernel on my SuSE box yesterday (I have a software RAID as my root partition too).

I noticed that it had another setting (possibly a patch?) to allow booting from RAID, in addition to the driver modules. I don't have the details to hand, but I will post them later when I get home (assuming I remember).

<< EDIT: The obscure message I get when I run "make modules modules_install install" is
Code:

Modules:
none
Including:      raidautorun
Bootsplash:    SuSE (1024x768)

I don't know what this means and I can't see any reference to raidautorun anywhere in the kernel source tree. Possibly it's a SuSE thing, but my system does boot from RAID. //>>

It's possible that it can't find the /dev/md0 file; are you using something like devfs, or do you have /dev/ as a simple directory?

One option is probably to create a little non-RAID / partition to include /dev, and boot from that, then remount / over the top. Or you could just install SuSE (which supports software RAID root partitions out of the box using the advanced options in the installer).

You may also find something to help here: http://www.tldp.org/HOWTO/Software-R...O-7.html#ss7.5

spuzzzzzzz 08-12-2004 04:36 PM

I moved my root partition to a non-RAID disk but the same thing happens (yes, I did remember to change to "root=" boot option). Which is really strange because, about 10 lines before the kernel panics, it lists all my hard dives correctly (capacity, model numbers, etc.). And then it says it can't mount /dev/sda3. I compiled devfs support into the kernel and told it to mount automatically at boot.

Electro 08-12-2004 05:15 PM

RAID 0 or RAID 5 will not help LINUX to speed up because all the files are very small. RAID 1 will speed up access files in LINUX because it will use each hard drive in the array to access different files at a time. If you have four hard drives in a RAID 1 setup, about four files can be access at a time which will decrease the amount of time a program loads up. With RAID 1 setups you do not have to worry much about hard drive failures as it were in RAID 0 or RAID 5.

Just my :twocents:

fedorafreak 08-12-2004 06:56 PM

here click here
just change it to raid 0

spuzzzzzzz 08-13-2004 12:28 AM

I have now demonstrated my stupidity twice on these forums. Although I had compiled support for my SATA chipset into my kernel, I had compiled SCSI disk support as a module (I'm not sure why that's possible but it is). Sorry for wasting your time.


All times are GMT -5. The time now is 10:21 PM.