[Hampshire] Autodetecting software RAID devices

Top Page

Reply to this message
Author: Nick Chalk
Date:  
To: hampshire
Subject: [Hampshire] Autodetecting software RAID devices
Does anyone have experience with 'partitionable'
software RAID devices, and convincing the kernel
to auto-detect them?

I'm experimenting with a new server build [1], and
trying to get software RAID working on four SCSI
disks. I have the system booting, but it's
detecting the second RAID device as ordinary, not
partitionable.

The distro is Debian Etch, although I've had to
create the RAID devices by hand as the installer
only supports single partitions. The set-up is
like this:

   - Four SCSI disks, sda to sdd, each with two
     partitions.
   - sd[abcd]1 forms a small RAID-1 array of 3
     disks, with one hot spare, for the root
     partition. This is /dev/md0 or /dev/md/0, an
     old-style single partition array [2].
   - sd[abcd]2 forms a larger RAID-5 array of 3
     disks, with one hot spare, as a new-style
     partitionable device. This is /dev/md/d1,
     with partitions /dev/md/d1p1 to /dev/md/d1p4.


On boot, the kernel correctly detects md0, and
activates the /dev/md0 device. However, it also
detects a /dev/md1 device, the RAID-5 array, but
then can't find the partitions it contains.

I think the kernel, in allocating /dev/md1, is
detecting the second array as an old-style device.
At the moment, I'm still using the standard Etch
kernel, with md_mod in an initrd. I've added the
option "raid=partitionable" to the module in
/etc/modprobe.d, but that doesn't seem to have
helped.

I wonder if the RAID device detection is actually
being done before md_mod is loaded, and I'll
therefore need to build a kernel with it compiled
in.

I know that the arrays are clean and operational -
the system boots on md0, then drops into single-
user mode when fsck complains. From there, I can
stop md1, and activate /dev/md/d1 correctly. The
system will then continue to boot fine.

My only other thought was whether there was
incorrect information stored in the RAID super-
block for /dev/md/d1. Unfortunately, I can't find
much documentation on these partitionable devices.
:-(

Any ideas welcomed!

Thanks,
Nick.


[1] The build's new - the server isn't.

[2] I went for RAID-1 so that LILO could boot from
    it. I soon discovered that Etch's LILO doesn't
    support partitionable devices.


--
Nick Chalk ................. once a Radio Designer
Confidence is failing to understand the problem.