Creating a RAID 1 from existing drive

Tom H tomh0665 at
Fri Jun 25 09:00:12 UTC 2010

On Thu, Jun 24, 2010 at 11:50 AM, Preston Hagar <prestonh at> wrote:
> On Wed, Jun 23, 2010 at 9:38 PM, Eric Dannewitz <ericdano at> wrote:
>> I have a Ubuntu server that has one HD in it right now. I just obtained
>> another drive that is exactly the same (manufactor/size/model). Is it
>> possible to mirror the existing drive with this one? If so, how? Do I need
>> to reformat anything?
> I have used this guide many times with a lot of success:

Thanks for the link. I'd forgotten to point out a second "sfdisk
-d..." and an "update-initramfs..." in my email so, even though I
hadn't intended to write a comprehensive howto, I missed two important
steps and I stand corrected.

Regarding the tolaris procedure: It is relatively old (from a Ubuntu
perspective not from a Debian Lenny perspective) so it uses vol_id and
grub1 but that's easily adaptable and it doesn't allow for booting in
degraded mode.

Regarding your email, a small semantic point:

You describe the tolaris procedure as creating a "degraded RAID 1
array" but it isn't quite the case.

Creating a mirror with
mdadm --create /dev/md0 --level=1 --force --raid-devices=1 /dev/sdb1
means that you are creating a raid1 mirror with one sub-mirror (to
borrow from Solaris terminology).

To create a degraded mirror, you would have to run
mdadm --create /dev/md0 --level=2 --raid-devices=2 missing /dev/sdb1
which means that when you add sda1, you would run
mdadm /dev/md0 --add /dev/sda1
rather than
mdadm /dev/md0 --grow --raid-devices=2
mdadm /dev/md0 --add /dev/sda1
as in the "one sub-mirror case".

More information about the ubuntu-users mailing list