Date: Fri, 28 Sep 2001 19:08:38 -0500 From: Doug Swarin <doug@staff.texas.net> To: hackers@freebsd.org, Leo Bicknell <bicknell@ufp.org> Subject: Re: Mirrored / redundant disks. Message-ID: <20010928190838.A46600@staff.texas.net> In-Reply-To: <20010928194526.A40019@ussenterprise.ufp.org>; from bicknell@ufp.org on Fri, Sep 28, 2001 at 07:45:26PM -0400 References: <20010928194526.A40019@ussenterprise.ufp.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010928190838.A46600>
