[lug] more RAID0 on /

D. Stimits stimits at comcast.net
Sat Nov 20 01:05:49 MST 2004

Nate Duehr wrote:
> On Fri, Nov 19, 2004 at 08:24:30PM -0700, D. Stimits wrote:
>>Ok, with some hints from people here I've partially solved the dilemma. 
>>At this point I was able to use rescue mode and install grub on the scsi 
>>part of the system (review: installed to IDE and trying to swap over to 
>>SCSI with RAID0 root partition, and normal SCSI /boot/), and get it 
>>partially working.
>>At this point it reads the kernel off the /boot/ partition, and gets as 
>>far as attempting pivot_root, then fails. Now since the kernel has raid0 
>>compiled in directly, I am guessing that it is failing to raidstart 
>>/dev/md0. The partitions are marked in fdisk as "Linux raid autodetect" 
>>though, and if I boot to this same kernel (it is an exact copy) under 
>>IDE it does automatically detect and start /dev/md0. My question is why 
>>if this is autostart raid0, how come it works under IDE but not under 
>>SCSI with root partition on md0? Does autodetect require something that 
>>must be made available by mounting the root partition, thus defeating 
>>the ability to raidstart? Or should the kernel with compiled in RAID0 
>>and autodetect marked partitions detect properly to allow mount of 
>>/dev/md0 on /? Or perhaps my grub.conf kernel line is incorrect:
>>   kernel /vmlinuz-2.6.9-2smp ro root=/dev/md0
> Are you using an initrd image?  Is it just trying to pivot_root to
> somewhere that doesn't exist anymore?  Did you re-make the image with
> the right paths passed to mkinitrd?

I use an initrd, but the scsi and raid is built in. This same kernel and 
initrd mounts with autodetecting just fine as long as /dev/md0 is not 
the root device. I even went so far as to gunzip the initrd, mount it, 
mknod the md0 device, re-tar and re-gzip it and try again with a 
guaranteed /dev/md0 device special file...but it is unable to use that 
file. The story is the same if I use rescue mode on the KRUD CD, except 
that in that case "raidstart" is available and I can run raidstart and 
*then* successfully mount /dev/md0 on the rescue. Near as I can tell I 
have to find a statically linked raidstart and add it to the initrd 
along with linuxrc edits to have it raidstart /dev/md0. I'm confused as 
to how autodetect works, I'm convinced that the wording is completely 
wrong and saving superblock metadata options don't automate a thing so 
far as the kernel is concerned...it appears as if userland tools are 
required and that the autodetect is nothing more than an elaborate call 
to /sbin/raidstart. Can't get to /sbin/ without mounting root, and can't 
mount root without raidstart, even though the kernel understands raid0 
just fine. I wish that the raidstart program were shell script and not 
compiled C, which would make it possible to just put it in the linuxrc 
file of the initrd.

There does not appear to be any way to get a statically linked raidstart 
file either, I unpacked the source and checked the configure options and 
no static link option exists. To custom build a static raidstart I'd 
have to figure out how to get a static libc.6 as well as static 
ld-linux.so and even then it might not be enough because of some virtual 
kernel functions (linux-gate.so.1). I had gone out to look for a static 
glibc 2.3 rpm but did not find any, after which I gave up on statically 
compiling my own modified version.

D. Stimits, stimits AT comcast DOT net

More information about the LUG mailing list