On Saturday 19 November 2005 16:19, Brian Parish wrote:
> On Sunday 13 November 2005 17:33, Brian Parish wrote:
> > On Sunday 13 November 2005 17:23, Richard Fish wrote:
> > > On 11/12/05, Mike Williams <[EMAIL PROTECTED]> wrote:
> > > > On Sunday 13 November 2005 01:49, Brian Parish wrote:
> > > > > I am trying to add a software RAID 5 disk set to an existing
> > > > > machine installed using genkernel. All the RAID support is compiled
> > > > > into the kernel, but no /dev/md? device files exist. I can create
> > > > > these using mknod and make the RAID, but they don't survive a
> > > > > reboot. How do I tell udev to create these files as persistant
> > > > > devices?
> > > >
> > > > All partitions in the RAID set need to be set to partition type fd
> > > > (Linux raid autodetect), then the kernel will build the arrays during
> > > > startup.
> > >
> > > FYI, this is only true if the raid drivers are compiled into the
> > > kernel (no modules), and you do _not_ use an initramfs to boot the
> > > system.  If you use an initramfs, the kernel skips the autodetection
> > > of raid arrays.
> > >
> > > -Richard
> >
> > I did and it does (skip that is).  Thanks again Richard.
> >
> > Brian
>
> Removing the initramfs seemed like the line of least resistance here, so
> being basically lazy, that's what I did.  /dev/md0 is now created and I can
> create my RAID array happily enough.
>
> This still doesn't survive a reboot though.  i.e. I have to run the mdadm
> --create command again.  I assumed that this required something in
> mdadm.conf, so I updated that with all the magic numbers shown by mdadm -D.
> No change though.  Is this an rc-update issue, or something?
>
More info on this:  It turns out that the main problem is/was that at the time 
the system is attempting to mount the RAID set, not only has it not been 
assembled, but the devices which compose it do not exist.  /dev/sda, b and c 
are being created sometime later in the boot process.

I have now implemented a smooth work-around by:

1. Setting the RAID in fstab to noauto and no checking
2. Creating a script in /etc/init.d which assembles and mounts the RAID set
3. Adding this script to the default group using rc-update

While this means that everything works nicely, it does seem like a kludge and 
there is presumably a way to have the SATA (SCSI) devices created early in 
the boot process, so that the RAID set can be assembled and ready for the 
entry in fstab to be processed.

cheers
Brian
-- 
gentoo-user@gentoo.org mailing list

Reply via email to