public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Creating RAID devices - udev question
@ 2005-11-13  1:49 Brian Parish
  2005-11-13  2:25 ` Richard Fish
  2005-11-13  5:44 ` Mike Williams
  0 siblings, 2 replies; 10+ messages in thread
From: Brian Parish @ 2005-11-13  1:49 UTC (permalink / raw
  To: gentoo-user

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?

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



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Creating RAID devices - udev question
  2005-11-13  1:49 [gentoo-user] Creating RAID devices - udev question Brian Parish
@ 2005-11-13  2:25 ` Richard Fish
  2005-11-13  5:44 ` Mike Williams
  1 sibling, 0 replies; 10+ messages in thread
From: Richard Fish @ 2005-11-13  2:25 UTC (permalink / raw
  To: gentoo-user

On 11/12/05, Brian Parish <bmp@univexsystems.com> 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?

udev doesn't handle software raid devices.  You need to edit
/etc/conf.d/rc, and make sure that "raid" appears in RC_VOLUME_ORDER. 
You will also need to edit/create /etc/mdadm.conf to describe your
raid array.  Gentoo will then take care of creating the raid devices
as part of the system startup.

-Richard

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Creating RAID devices - udev question
  2005-11-13  1:49 [gentoo-user] Creating RAID devices - udev question Brian Parish
  2005-11-13  2:25 ` Richard Fish
@ 2005-11-13  5:44 ` Mike Williams
  2005-11-13  6:23   ` Richard Fish
  1 sibling, 1 reply; 10+ messages in thread
From: Mike Williams @ 2005-11-13  5:44 UTC (permalink / raw
  To: gentoo-user

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.

-- 
Mike Williams

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Creating RAID devices - udev question
  2005-11-13  5:44 ` Mike Williams
@ 2005-11-13  6:23   ` Richard Fish
  2005-11-13  6:33     ` Brian Parish
  0 siblings, 1 reply; 10+ messages in thread
From: Richard Fish @ 2005-11-13  6:23 UTC (permalink / raw
  To: gentoo-user

On 11/12/05, Mike Williams <mike@gaima.co.uk> 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

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Creating RAID devices - udev question
  2005-11-13  6:23   ` Richard Fish
@ 2005-11-13  6:33     ` Brian Parish
  2005-11-19  5:19       ` Brian Parish
  0 siblings, 1 reply; 10+ messages in thread
From: Brian Parish @ 2005-11-13  6:33 UTC (permalink / raw
  To: gentoo-user

On Sunday 13 November 2005 17:23, Richard Fish wrote:
> On 11/12/05, Mike Williams <mike@gaima.co.uk> 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
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Creating RAID devices - udev question
  2005-11-13  6:33     ` Brian Parish
@ 2005-11-19  5:19       ` Brian Parish
  2005-11-19 14:15         ` Brian Parish
  2005-11-21 15:32         ` Neil Bothwick
  0 siblings, 2 replies; 10+ messages in thread
From: Brian Parish @ 2005-11-19  5:19 UTC (permalink / raw
  To: gentoo-user

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 <mike@gaima.co.uk> 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?

Thanks yet again
Brian
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Creating RAID devices - udev question
  2005-11-19  5:19       ` Brian Parish
@ 2005-11-19 14:15         ` Brian Parish
  2005-11-19 14:35           ` Mike Williams
  2005-11-19 15:30           ` A. Khattri
  2005-11-21 15:32         ` Neil Bothwick
  1 sibling, 2 replies; 10+ messages in thread
From: Brian Parish @ 2005-11-19 14:15 UTC (permalink / raw
  To: gentoo-user

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 <mike@gaima.co.uk> 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



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Creating RAID devices - udev question
  2005-11-19 14:15         ` Brian Parish
@ 2005-11-19 14:35           ` Mike Williams
  2005-11-19 15:30           ` A. Khattri
  1 sibling, 0 replies; 10+ messages in thread
From: Mike Williams @ 2005-11-19 14:35 UTC (permalink / raw
  To: gentoo-user

On Saturday 19 November 2005 14:15, Brian Parish wrote:
> > 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.

That's certainly interesting. What SATA card do you have?
If it's got in kernel drivers, having them compiled into the kernel will get 
them setup before raid starts.

-- 
Mike Williams

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Creating RAID devices - udev question
  2005-11-19 14:15         ` Brian Parish
  2005-11-19 14:35           ` Mike Williams
@ 2005-11-19 15:30           ` A. Khattri
  1 sibling, 0 replies; 10+ messages in thread
From: A. Khattri @ 2005-11-19 15:30 UTC (permalink / raw
  To: gentoo-user

On Sun, 20 Nov 2005, Brian Parish wrote:

> 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

Yes, this seems like an unnecessary kludge to me.

I have several servers all using software RAID, udev and 2.6 kernels (all
are SCSI, one is SATA) without any problems.



-- 

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Creating RAID devices - udev question
  2005-11-19  5:19       ` Brian Parish
  2005-11-19 14:15         ` Brian Parish
@ 2005-11-21 15:32         ` Neil Bothwick
  1 sibling, 0 replies; 10+ messages in thread
From: Neil Bothwick @ 2005-11-21 15:32 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 523 bytes --]

On Sat, 19 Nov 2005 16:19:53 +1100, Brian Parish wrote:

> 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.

Are the partitions comprising the RAID marked 'Linux raid autodetect' in
cfdisk/fdisk?


-- 
Neil Bothwick

Scrute the inscrutable; eff the ineffable.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-11-21 15:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-13  1:49 [gentoo-user] Creating RAID devices - udev question Brian Parish
2005-11-13  2:25 ` Richard Fish
2005-11-13  5:44 ` Mike Williams
2005-11-13  6:23   ` Richard Fish
2005-11-13  6:33     ` Brian Parish
2005-11-19  5:19       ` Brian Parish
2005-11-19 14:15         ` Brian Parish
2005-11-19 14:35           ` Mike Williams
2005-11-19 15:30           ` A. Khattri
2005-11-21 15:32         ` Neil Bothwick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox