On Tue, May 12, 2009 at 12:47:32PM +0200, [email protected] wrote: > I've recently started playing around with the softraid(4) driver, as I > recently noticed that bsd.rd already comes with support for it. What I > want to accomplish is to place as much as possible into the RAID set > (RAID 1, of course), ideally (almost) booting from it. > > Up until now I have used ccd(4). Since it isn't possible to create > ccd-containers at install, I've always made disklabel with some space > for the root mount, then one big slice for "the rest", and as soon as > the base install was done bring up the ccd-container, set up the "real" > disklabel there, and move /usr, /var, etc. there, relying on daily(8) to > keep my / mirrored in /altroot. > > Now I'm wondering if this whole process could be simplified precisely > with softraid. I've already been able to construct a mirror set at > install. My first naive try was to make a sort of pseudo-disklabel on > the "real" disks, so that the 'a' slice just spans the entire disk, > typed "RAID". Then I instructed bioctl to build a RAID 1-set out of > those two slices. Reboot, bsd.rd still finds it, and now install into > the new sd0. > > Of course, this didn't work and fails first thing at boot giving > "ERR M". Reading up about the boot process, I'm now quite sure that it > coulnd't possibly work this way ever since /boot has no way of knowing > about the softraid-container until the kernel is loaded, which precisely > would be /boot's function. > > What I now tried was allocating just a very tiny "boot" slice (just > enough space for boot and the kernel), and having installboot(8) > instructed to use *this* bootloader (outside of the RAID-set) to boot. > I now get the kernel to load without problem, just as expected, and the > kernel also finds the RAID-set at sd0 as bsd.rd did, so in theory it > could just go on and boot from there. But instead, it tries to use this
RAIDframe users use this same scenario since years... --> raidctl(8) and /Root on RAID > "boot-slice" (wd0a) as it's root device, which of course must fail (and > does so, quite spectacularily). > > The boot(8) manpage gives the hint of using '-a' to be able to specify > which drive the kernel should use as it's root drive. This way, I *am* > able to successfully boot into my newly installed system. So this looks > like my idea could at least theoretically work. However, I have not yet > found any way of somehow storing this device somewhere so that I *don't* > have to physically sit there and type in 'sd0' whenever I just happen to > be wanting to boot. > > Now, what I want to ask: Is there a way to somehow "force" the root > device of my choice into the kernel, e.g. ` la config(8)? Or is there > maybe a way of specifying it into a boot.conf-stub placed into my > "boot-slice"? Or am I simply wasting my time and should stick to a root > *outside* the RAID-set which daily mirroring into /altroot? As already pointed out, you have to recompile a kernel with a special config (config bsd root on sd0a swap on sd0b dumps on xxx) BTW, can the dumps be saved on a softraid RAID1 discipline? Otherwise, you have to use a real disk. -- Olivier Cherrier - Symacx.com mailto:[email protected]

