From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.50) id 1EdTel-0001BH-KS for garchives@archives.gentoo.org; Sat, 19 Nov 2005 14:25:32 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.5/8.13.5) with SMTP id jAJEOFD6029024; Sat, 19 Nov 2005 14:24:15 GMT Received: from univexsystems.com (adsl-20-117.swiftdsl.com.au [218.214.20.117]) by robin.gentoo.org (8.13.5/8.13.5) with ESMTP id jAJEGMr2032393 for ; Sat, 19 Nov 2005 14:16:23 GMT Received: from [192.168.0.50] (unknown [192.168.0.50]) by univexsystems.com (Postfix) with ESMTP id B377083C04D for ; Sun, 20 Nov 2005 01:16:20 +1100 (EST) From: Brian Parish Organization: Univex Systems Pty Ltd To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Creating RAID devices - udev question Date: Sun, 20 Nov 2005 01:15:39 +1100 User-Agent: KMail/1.8.1 References: <200511131249.00538.bmp@univexsystems.com> <200511131733.11290.bmp@univexsystems.com> <200511191619.53151.bmp@univexsystems.com> In-Reply-To: <200511191619.53151.bmp@univexsystems.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200511200115.39535.bmp@univexsystems.com> X-Archives-Salt: 90d1996a-c013-4878-8682-24672b93d161 X-Archives-Hash: 1ab56b3e8853fc71fb63702389b2edc8 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 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