Move RAID1 to new machine [closed]

I have an older server with / on one hard drive and /srv on a RAID1 partition, which I remember took some time to set up (I set it up after the installation). I will be installing Ubuntu 10.04 onto a new server, but would like to take the /srv hard drives to the new machine.

What steps need to be taken to ensure a complete and proper migration? Should I tell the installer about the additional drives, or connect them after setup has completed?

For reference, I will be installing the "Standard" Ubuntu desktop, and adding server applications, rather than installing a "Server" Ubuntu and adding desktop applications.


Solution 1:

I checked in a VirtualBox: The Desktop Installer does not recognize existing mdadm Raid1 devices.

You should

  • install ubuntu
  • plugin the 2 raid hdds afterwards.
  • (you should reboot to be on the safe side)
  • Then install mdadm with sudo apt-get install mdadm
  • cat /proc/mdstat You should see your inactive RAID
  • sudo mdadm --assemble /dev/md_d0 /dev/sdb1 /dev/sdc1 (change the sdb1 and sdc1 to your raid partitions)
  • sudo mdadm --detail --scan

The output on my system is:

  berni@virtual2:~$ sudo mdadm --detail --scan
  ARRAY /dev/md/d0 level=raid1 num-devices=2 metadata=00.90 UUID=bcb40263:0fe2be0e:4a925ea7:19eea675
  • Copy the whole ARRAY .. line to the end of /etc/mdadm/mdadm.conf
  • Now your raidconfig is preserved and you can use /dev/md0 as a normal device
  • For example sudo mount /dev/md0 /mnt/raid

This stuff is working on Lucid & Maverick