Can I create a "soft" RAID1 array without nuking data?

9,003

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..."

Share:
9,003

Related videos on Youtube

Oli
Author by

Oli

Hi, I'm Oli and I'm a "full-stack" web-dev-op. Eurgh. I'm also allergic to jargon BS. I spend most of my professional time writing Django websites and webapps for SMEs. I write a lot of Python outside of Django sites too. I administer various Linux servers for various tasks. I contribute to the open source projects that I use when I can. I'm a full-time Linux user and that has lead to helping other people live the dream. I am an official Ubuntu Member and I earnt my ♦ on SE's own Ask Ubuntu in 2011's moderator election. That's probably where I spend most of my unpaid time. I also run thepcspy.com which has been my place to write for the last decade or so. If you need to contact me for extended help, you can do so via my website, just remember that I have bills so if I feel your request is above and beyond normal duty, I might ask for remuneration for one-on-one support. For more social contact, you can usually find me (or just my computer) lurking in the Ask Ubuntu General Chat Room and on Freenode in #ubuntu and #ubuntu-uk under the handle Oli or Oli``.

Updated on September 17, 2022

Comments

  • Oli
    Oli over 1 year

    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.

  • Dan Carley
    Dan Carley almost 15 years
    Yep. Create a degraded array, copy the data to the array, then add the second disk and wait for it to sync up.
  • Oli
    Oli almost 15 years
    MAGIC! Thank you!
  • Oli
    Oli almost 15 years
    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?
  • Daniel Lawson
    Daniel Lawson about 13 years
    @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.
  • Bobe Kryant
    Bobe Kryant about 13 years
    Woah! This is a really good "cheat" :) I will upvote and "steal" this method as my own.