[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: drive mirroring



On Fri, Aug 09, 2002 at 02:48:43PM -0500, Bob T. Kat wrote:
> Back when I was trying to do drive mirroring with software (on linux)
> you could not mirror the root partition, I don't remember why now, but I
> fought with it for quite some time (and some experimental kernels)

That hasn't been the case for a while.  Here's a box I just set up (a
few minutes ago, in fact):

    Filesystem           1k-blocks      Used Available Use% Mounted on
    /dev/md7                521684     78116    417068  16% /
    /dev/md2                132134      8911    116401   8% /boot
    [...]

To answer the original question, I would partition the second disk
*exactly* like the first (use fdisk, try to keep the partition
start/end on the same cylinders), that way you get the most usable
disk space.  Then migrate the partitions to software RAID by copying
the data off each partition, one at a time, adding the partition on
the original drive and the new drive to /etc/raidtab like this:

    raiddev			/dev/md0
    raid-level			1
    nr-raid-disks		2
    persistent-superblock	1
    nr-spare-disks		0
	device			/dev/hda1
	raid-disk		0
	device			/dev/hdc1
	raid-disk		1

Create the md device with mkraid ("mkraid /dev/md0"), create a
filesystem, and restore your data.  Lather, rinse, repeat.

It will be time-consuming, but it will work.

Steve
-- 
steve@silug.org           | Southern Illinois Linux Users Group
(618)398-7360             | See web site for meeting details.
Steven Pritchard          | http://www.silug.org/

-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.