5

I have home server (Ubuntu Server 10.04) which boots from single 80Gb HDD drive, now I want to make it boot from 2x500Gb RAID-1. I've already successfully created it through MDADM.

But how can I move system to this array so that it can boot?

I've seen some guides in the internet about adding second hdd and making RAID1, but this is not my case...

1
  • Awesome question!! It would be really good to know how to move a system to a RAID-1 array.
    – sebikul
    Mar 21, 2011 at 1:14

2 Answers 2

3

Briefly:

  1. make a backup of anything important

  2. make a boot cd or usb stick and test it

  3. make the mirror pair and a partition on it

  4. (optional) make an lvm pv on the partition, then a logical volume on that

  5. dd your existing root filesystem onto that new lv

  6. resize2fs it to grow it to use the new space

  7. reboot, interrupt grub, and set the root= parameter to point to one of your new disks

  8. you should now be up using the new disk; now reinstall grub onto the boot sector of one of the mirrored disks, pointing at the new system

  9. change the machine's bios to boot from one of the mirrored disks

There is some risk these rearrangements will leave your system temporarily unbootable so you should only start on this if you're reasonably confident doing low-level rearrangements and/or you have a second machine you can use to ask for help.

Ask if you need more help on any of these points. If none of them make any sense, you should probably just do a fresh install onto the new disks, unless you have a big appetite for adventure. ;-)

0

Clone the first disk with dd and then restore it on the raid solution.

http://www.backuphowto.info/linux-backup-hard-disk-clone-dd

5
  • I afraid it would not be bootable then. Mar 22, 2011 at 5:13
  • Because? It's a 100% copy...
    – mount.cifs
    Mar 22, 2011 at 5:59
  • Because mdadm stores metadata on the underlying physical device. Mar 22, 2011 at 8:49
  • Ah, you're using software raid. Then it would be quite hard...
    – mount.cifs
    Mar 22, 2011 at 11:14
  • 1
    Maybe just copy the files traditionally and then install a bootloader?
    – mount.cifs
    Mar 22, 2011 at 11:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .