8

I've just bought two 1.5TB disks with the aim of creating a 1.5TB RAID1 array.

In my infinite lack of wisdom (and a lack of space inside the computer - it already had 6 disks), I stuck one in, formatted it to EXT4 and proceeded to copy data all over it from drives that I'm subbing out.

Now I want to create a mdadm RAID1 array with its twin disk. I thought this was possible. Probably involving unmounting and dding the content across but I'm sure I saw this somewhere before...

But I can't find the tutorial I used the last time I was setting up mdadm so I'm scared. I don't want to nuke 800gigs of data.

Oli
  • 1,791
  • 17
  • 27
  • Just for the records, another step by step guide: [How to Set Up a RAID 1 Under GNU/Linux](http://blog.infertux.com/2012/03/29/how-to-set-up-a-raid-1-under-gnu-slash-linux/). – Nikos Alexandris Jul 17 '13 at 22:01

1 Answers1

15

You're most likely talking about this http://www.debian-administration.org/articles/238

"Now use mdadm to create the raid arrays. We mark the first drive (sda) as "missing" so it doesn't wipe out our existing data..."

Karolis T.
  • 2,709
  • 7
  • 32
  • 45
  • 4
    Yep. Create a degraded array, copy the data to the array, then add the second disk and wait for it to sync up. – Dan Carley Jul 23 '09 at 13:29
  • Okay, just read through it twice. Their example is a little more expansive than my setup (I've only 1 partition for starters) but do I have the steps right: 1. Create the mdadm array on the second drive. 2. Copy the data across onto the new drive/array. 3. Add the "old" drive to the array... And then mdadm nukes the first disk and restores the data from the second disk... Sound about right? – Oli Jul 23 '09 at 14:57
  • @Oli: You've got the basic idea, but you will need to reboot onto the new array before adding the old drive into the array. – Daniel Lawson Mar 08 '11 at 08:27
  • Woah! This is a really good "cheat" :) I will upvote and "steal" this method as my own. – Mister IT Guru Apr 20 '11 at 07:42