Replacing both disks in RAID1

Derek derekm.nospam at rogers.com
Fri Jan 14 05:27:19 PST 2005


Toomas Aas wrote:
> 1. Attach one of the new drives to free ICH4 IDE port on motherboard, 
> partition it and transfer the data using dump/tar.

At this stage, I would recommend doing this in single user mode, to keep 
filesystem modifications during the procedure down.  I typically use 
dump for all partitions when in single user mode like so:

#adjkerntz -i
#swapon -a
#mount -a

...
#mount /dev/ad0s1a /mnt/newroot
...

/mnt/newroot# dump 0af - / | restore xf -
/mnt/newtmp# dump 0af - /tmp | restore xf -
...etc

> 2. Remove the 80 GB drives, attach 200 GB drives (one with data, one 
> blank) to TX2 IDE ports and re-create the mirror using Promise onboard 
> BIOS utility.

I would go with this if you can afford the time.  On servers that we 
don't want down for long, I recreate the mirror in the BIOS, let it 
mirror to 1%, and then reboot (ignoring the RAID error), and start 
rebuilding with atacontrol.  It still takes a while, and the server is 
slow because of the excessive disk i/o, but it is responding.

> 3. Reboot, fix the fstab (if necessary) and be done with it.

Shouldn't need a reboot/mess with fstab if you are careful.

 From my experience with the Promise cards, this is the way to go.  I've 
had to upgrade serveral machines, as we've been using the cards in 
production.

The one caveat that I would warn you about is making sure that all your 
corresponding partitions line up, to prevent having to mess with fstab 
(and have the data in the same relative physical location on the drive)

So if your fstab looks something like:

/dev/ar0s1b none swap...
/dev/ar0s1a / ufs...
/dev/ar0s1f /tmp ufs...
/dev/ar0s1g /usr ufs...
/dev/ar0s1e /var ufs....

Make sure that your new disk label's partions correpond to the lettering:

newswap -> /dev/ad0s1b
newroot -> /dev/ad0s1a
newtmp -> /dev/ad0s1f
newusr -> /dev/ad0s1g
newvar -> /dev/ad0s1e

You don't need any dumping for the swapfs.  I don't know what will 
happen if you do, never tried.

Cheers,
Derek


More information about the freebsd-questions mailing list