On Thursday 22 September 2005 04:37 am, Anders Norrbring wrote:
I'm about to move a fully functional system from a box with ONE IDE drive to a box with TWO IDE drives configured as RAID-1 (mirror) via Linux software.
Any ideas on how I can do that? Normally a disk to disk would be to use dd if=/dev/hda of=/dev/hdb, but that wouldn't work here I guess..
This is from a post I made some time back. Also, do a search for "Software Raid and Grub HOW-TO". That and http://www.linux.com/howtos/Boot+Root+Raid+LILO-4.shtml were the what got me started: I have done this many times and have posted some instructions to this list. I'm not at home right now, but basically: Install your new disk and reboot. Use fdisk to partition the new disk just like the old disk I create "broken" raid device(s) from hdb with an /etc/raidtab like this: raiddev /dev/md0 raid-level 1 nr-raid-disks 2 nr-spare-disks 0 persistent-superblock 1 device /dev/hda1 failed-disk 0 device /dev/hdb1 raid-disk 1 Add more sections to the file for each partition you want to mirror. Then mkraid /dev/md0 (and any others) and format them. Mount the new device(s) somewhere and copy to them using "cp -a". Don't copy /proc or the mount point for the new raid device. Just create the directories. Modify fstab *on the new raid device*. Create an entry in grub on *both* devices to boot it. If everything boots OK use raidhotadd to to make hda2 part of the raid system (this is the point of no return). Then use grub: grub Grub>device (hd0) /dev/hda Grub>root (hd0,0) and then: Grub>setup (hd0) Grub>device (hd0) /dev/hdb Grub>root (hd0,0) and then: Grub>setup (hd0) quit This has worked for me on several machines. I hope it helps you out. -- Louis Richards