1

I had a disk Running Ubuntu 14.04 LTS Desktop that crashed. I have a disk image of the drive and i want to put it onto a raid 1. That's it, i thought it would almost as easy as it sounds but apparently not. What is the correct way to do this?

  • Hello! Welcome to U&L Stack exchange! What kind of things have you tried? and where have you run into problems? – Gravy Oct 14 '15 at 17:11
  • Well I first read that it was impossible to set up a RAID on Ubuntu Desktop So i installed Ubuntu Server to set up the RAID I did that and installed a desktop and i tried to use Disk Utilities to restore the image onto the array but when it was finished it didn't say it was bootable so despite that I tried to boot into the RAID and i got an these error Error: Failure reading sector 0xb30 from 'fd0'. Error: disk 'mduuid/fa7b9241e0731112a0cde1df0453b450' not found. – VantaRabbit Oct 14 '15 at 17:35
  • Thanks, I can create the RAID array fine, however That doesn't help me with restoring an image to the Array. – VantaRabbit Oct 14 '15 at 18:10

1 Answers1

0

If you've created a RAID-1 volume (with mdadm --create or by any other means), you can copy the disk image onto the volume, provided that it's large enough. You may prefer to copy only one partition instead.

By default, RAID volumes have metadata at the beginning, so the new location of the image is at an offset. Because of this, you need to tell the bootloader that its location has changed. With Grub, you need to run grub-install again, e.g. sudo grub-install /dev/sda if /dev/sda is your Grub disk. You may need to instruct Grub to load its RAID-1 support, though I think with RAID-1 you can actually get away without it. I think it's enough to run sudo update-grub.

You may also need to regenerate the initrd or initramfs to make sure it includes support for RAID, if you weren't using RAID before. On Ubuntu, run sudo dpkg-reconfigure linux-image-VERSION (with the version that your system is running) to regenerate the initramfs.

An alternative approach is to create a RAID-1 volume with the metadata at the end, rather than at the beginning. With mdadm, this means superblock format 1.0 instead of the default 1.2. See How to set up disk mirroring (RAID-1) for a guide to turning a volume into a RAID-1 component in place.