On Mon, 2 Nov 2009, Fedor Pikus wrote:

Date: Mon, 2 Nov 2009 09:55:25 -0800
From: Fedor Pikus <[email protected]>
Reply-To: "General Linux/UNIX discussion and help; civil and on-topic"
    <[email protected]>
To: "General Linux/UNIX discussion and help,       civil and on-topic"
    <[email protected]>
Subject: Re: [PLUG] Linux RAID1 question

On Mon, Nov 2, 2009 at 9:30 AM, Joe Pruett <[email protected]> wrote:
Is it possible to take an ordinary, non-RAIDed hard drive, and turn it
into a mirror without losing any data, using linux software RAID?

i'm assuming you have one disk with data and one spare.  the safe way is
to create a broken mirror with the spare drive and "missing" as the
other piece.  then copy all the data from the current drive to the mirror.
then reboot off the mirror and add the original drive to the mirror so it
can resync.  this involves lots of fdisk, mdadm, tar/rsync/cp, etc. so you
really need to know what you're doing.

Not just safe, the only way: you cannot change regular filesystem into
raid1 one, there is not enough room for the raid superblock (the same
partition formatted for raid will have slightly smaller capacity).

Also, if you want to boot from this raid, you will likely need to
rewrite the initrd image *before* you reboot: unless you already have
raid1 in use, the module won't be included in your initrd.

I never use initrd images. I'll be sure the kernel has RAID support
compiled into it before performing the migration.

Carlos
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to