Re: [Hampshire] Autodetecting software RAID devices

Top Page

Reply to this message
Author: Chris Dennis
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] Autodetecting software RAID devices
Nick Chalk wrote:
> 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.

>


Hello Nick

I did something similar recently on a test server as part of a learning
exercise. Except that I can't answer your question about partitioned
RAID-5 because I created a single partition and then used LVM to divvy
that up for /root, /home, etc.

I ended up with hd[abc]1 set up as RAID1 for /boot, hd[abc]2 as RAID5
for LVM (everything else), and managed all of that with the Etch installer.

(You're right that neither LILO nor Grub can handle RAID5 -- the
installer didn't tell me that, and I struggled for a while to work out
why it wouldn't boot)

So if you can't get partitioned RAID5 to work, perhaps LVM would be a
suitable alternative for you.

cheers

Chris
-- 
Chris Dennis                                  cgdennis@???
Fordingbridge, Hampshire, UK