NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Sat Jul 24, 2010 12:27 pm Post subject: |
|
|
n506,
Rebuild your kernel with raid1 support
On your new drive, make partitions the same size as the ones you want to mirror.
Set the partition type to 0xfd
Donate these new partitions to degraded raid1 sets using mdadm.
Degraded means the raid set has bits missing. They will later be filled by the partitions on your old drive.
make filesystems on the /dev/mdX nodes ... thats your degraded raid sets.
Copy your install to the raid sets. Do not use dd for this.
cp-a, tar, rsync ... anything that preserves permissions works.
Its best of you boot with a liveCD for the copy as you must not copy /dev, /proc and /sys from a 'live' root.
On the raid, fix /etc/fstab, so it refers to the raid volumes
In both /boot/grub.conf files copy your current boot stanza below your existing on and change the copy to use root=/dev/md... so it uses the raid for root.
Install grub to the MBR of your new drive.
You now have your old install intact and unchanged. A copy of your old install on a degraded raid sets on your new drive.
You should be able to boot either install from your old boot drive.
By setting your new drive to be the boot drive in your BIOS, you should still be able to boot both installs.
When that works, you are ready for the destructive step.
Boot into your degraded raid install and add your old partitions to your new raid sets to bring them up to strength.
This may take some time to complete as the raids will resync. That is the system will copy the data from the degraded raid to the partitions you have just added.
Progress will be shown in /proc/mdstat.
Lastly, change the partition types on your old drives to 0xfd.
You need not keep the same partition sizes on the raid install, as you will be copying the file content of your old install, you can make the partitions on the raid set different sizes if you wish. That will require a little planning as you need to match partition sizes across your raid and the old hard drives. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|