From owner-freebsd-hackers Fri Sep 28 17: 8:44 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mw3.texas.net (mw3.texas.net [206.127.30.13]) by hub.freebsd.org (Postfix) with ESMTP id F3E3B37B406 for ; Fri, 28 Sep 2001 17:08:39 -0700 (PDT) Received: from staff3.texas.net (staff3.texas.net [207.207.0.40]) by mw3.texas.net (8.11.6/8.11.6) with ESMTP id f8T08cE19305; Fri, 28 Sep 2001 19:08:38 -0500 (CDT) Received: (from doug@localhost) by staff3.texas.net (8.11.6/8.11.6) id f8T08cX46772; Fri, 28 Sep 2001 19:08:38 -0500 (CDT) (envelope-from doug) Date: Fri, 28 Sep 2001 19:08:38 -0500 From: Doug Swarin To: hackers@freebsd.org, Leo Bicknell Subject: Re: Mirrored / redundant disks. Message-ID: <20010928190838.A46600@staff.texas.net> References: <20010928194526.A40019@ussenterprise.ufp.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010928194526.A40019@ussenterprise.ufp.org>; from bicknell@ufp.org on Fri, Sep 28, 2001 at 07:45:26PM -0400 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I've got some experience with this. One of the solutions I have used in the past is as follows: 1. Configure the two disks with a root partition, swap partition, and a vinum partition covering the rest of the disk. If you make your root partition 128M, you can just barely fit a base system in there. Finagle a bit with disklabel -e so both disks have their partitions configured as: a: root filesystem b: swap space c: (entire disk) e: vinum Also, disklabel -B the second disk to make it bootable. 2. Set up vinum mirror volumes for /usr and /var. 3. Move the data from /usr and /var to their vinum equivalents in single user mode, and set up your fstab to mount the vinum volumes (for example, /dev/vinum/varvol). Make sure you add start_vinum="YES" to your rc.conf. 5. Set up the remainder of your system. cvsup sources and ports and so forth as necessary to configure it. 6. Mount the second disk's 'a' partition somewhere and use dump/restore to copy the primary disk's root partition to the secondary's. Optionally set up a cron job to keep the two in sync. With this configuration, if your primary disk fails, you can pull it and boot off the secondary disk. If your secondary disk fails, you'll still have the primary and can replace the secondary at your leisure. The only problem is if the primary disk fails completely, is not bootable, and is at a location where the box cannot have the drive removed. The only solution I know of in this case would be a hardware or pseudo-hardware RAID of some sort (I say pseudo- hardware because I'm not sure how much the various IDE RAID systems that are available depend on software to do their job). Other possibilities I am aware of are the various IDE flash-based drives. They have no moving parts and modern flash supports many write cycles (I would still suggest using them only as a boot drive with minimal writes and using a fully mirrored pair of standard hard drives for /usr, /var, /tmp, and so forth). You might also consider compiling your / into the kernel and having it mounted as a MD at runtime. You would not be able to make permanent changes without re-compiling your kernel, but then the unmirrored root partition would never be accessed after boot time, and you would ideally have duplicate copies on each disk to boot from. Doug On Fri, Sep 28, 2001 at 07:45:26PM -0400, Leo Bicknell wrote: > > I need to configure a server that can deal with a disk failure. > I've been looking at CCD and Vinum, but both seem to have issues > that make automatic recovery in the face of one dead disk (in a > mirror) less than optimal. > > So, if you know how to make it so a disk can die and the box keeps > running, and more importantly _can be rebooted_ and keep running > either via careful configuration or some crufty scripts if you > could contact me that would be welcome. No need to keep on-list > unless you think there's something of great value to hackers. > > -- > Leo Bicknell - bicknell@ufp.org > Systems Engineer - Internetworking Engineer - CCIE 3440 > Read TMBG List - tmbg-list-request@tmbg.org, www.tmbg.org > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message