On Tue, May 12, 2009 at 12:47:32PM +0200, Stefan Unterweger wrote: > Hello! > > 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.
I'd say the simplest way would be to have a root and /altroot partition not on RAID. The /altroot partition might as well be on the second disk, slice a. You might then even use installboot to make that disk bootable on its own, depending on what softraid will do if it finds just one and even worse, the second, disk where the first used to be (if you just remove disk 1 from your machine). Then RAID all other partitions: /var /usr /tmp /home, .. on the softraid disk. Keep slice b as swap on both disks, but only the first disk will be automatically used as swap. Put the second disk slice b in /etc/fstab. Or if you want swap RAIDed have no slice b on either disk, but on the softraid disk and activate it via /etc/fstab. Activate the existing /altroot backup in the crontab, as you were planning to. But if you want all RAID except for kernel loading, you will have to compile a custom kernel that uses a different root partition. It is a pity the desired root partition can not be specified from /etc/boot.conf (boot(8))... If you feel adventureous why not try to write a very short /etc/rc script that just does: #! /bin/sh /sbin/mount_ffs -o rdonly /dev/sd0a / exec /bin/sh /etc/rc.original I do not think it will work unless /dev/sd0a is rootdev but what the fsck, it would be interesting to know. That trick would also need /etc/boot.conf, /etc/login.conf, /bin/sh and /etc/pwd.db on the boot device, plus of course /bsd, /boot and /etc/rc. > : > > Thanks for any advice, > Stefan -- / Raimo Niskanen, Erlang/OTP, Ericsson AB

