PDA

View Full Version : Migrate Hard Drives and add RAID 1 - FC4



gamradtk
31st May 2006, 05:09 AM
I have an Opteron computer that currently has one 80 GB IDE HD. I want to copy the install and data to a 120 GB IDE HD. I want to then add a second 120 GB IDE HD so that I can mirror the two 120 GB IDE HDs. The 80 GB IDE HD will be removed once the install and data have been copied.

The 80 GB HD was not installed to use raid. The 80 GB HD uses LVM with /boot and / and swap only.

What would be the best way to perform this migration???

Thanks in advance!!!

zemb
31st May 2006, 10:02 AM
What I would try:

* Do not remove the 80 GB disk and install both 120GB HDs.
* Boot from a rescue CD.
* Create the RAID array, define the logical volumes and copy your data.
* Configure GRUB to boot from one of the new drives (I think you cannot boot from a RAID).

gamradtk
31st May 2006, 12:30 PM
The only problem is that the computer is 1U height and only has 2 drive bays.

tashirosgt
31st May 2006, 02:38 PM
You aren't a real hardware guy unless you have some machines with their tops off and some attached hard drives perched precariously near them on a kleenex box. Does the machine have enough controllers to run 3 hard drives, temporarily?

gamradtk
31st May 2006, 04:36 PM
Not really... Not easily anyway...

IBM eServer 325 with two IDE connectors, but cable routing to the CD-Rom drive is under the motherboard... and a really tight fit...

I have done the kleenex box thing on several occassions...

PlutoNash
6th June 2006, 04:39 PM
You aren't a real hardware guy unless you have some machines with their tops off and some attached hard drives perched precariously near them on a kleenex box. Does the machine have enough controllers to run 3 hard drives, temporarily?

So true :D I had mine set up like this for a time except instead of a Kleenex box, I had a phonebook :)

ccrvic
6th June 2006, 06:06 PM
I want to copy the install and data to a 120 GB IDE HD. I want to then add a second 120 GB IDE HD so that I can mirror the two 120 GB IDE HDs. The 80 GB IDE HD will be removed once the install and data have been copied.

What would be the best way to perform this migration???

Install one of the 120s. dd across your MBR, build a partition table of one 100MB partition (for /boot) and one other encompassing the rest of the drive. Make a filesystem on the 100MB partition & copy /boot across.

Create your RAID1 device:

mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/hdb2 missing
[I'm assuming hdb2 is the big partition on the 120GB drive]

Reboot with a liveCD. make sure it supports LVM.

Build a VG out of /dev/md0 and create logical volumes on it. Make filesystems on those LVs, copy all your stuff over from the old drive. Update /etc/fstab *on the new filesystem* to describe the layout you've just made as it will appear once the drive is live.

Powerdown & install the other 120GB drive. You'll want the drive you've set up already to be the boot drive.

Reboot & test. Your machine should come up on the first drive only.

Copy the partition table from the first drive to the second. I'd also copy the MBR and the /boot partition (you can boot off this drive if your primary fails for some reason).

Now add the bulk of the second HDD to the RAID array

mdadm /dev/md0 -a /dev/hdb2

Sit back and watch /proc/mdstat from time to time, and feel smug :-)

Vic.

jero
22nd August 2006, 12:21 PM
Hello !


I have similar problem. I'm newbie in Linux and so I wold like more specific info.

I have two SATA disks with default FC5 installation. This installation (if I am correct) create two partitions on primary disk. First is SDA1 for /boot
and second SDA2 for LVM. On LVM are two file sistems. first is LogVol00 with mount poin / (root) and second LogVol01 swap.


I guess I woud like to create RAID1 on seccond disk (SDB) and copy all data from original disk (SDA). After that we should boot from second disk (SDB) and synchronize with first disk (SDA) correct ?

Please can you tell me step by step command for this operations ?


Thank you in advanced !!!!!