[NBLUG/talk] non raid to raid move... on the fly ?

Eric Eisenhart eric at nblug.org
Thu Mar 27 11:39:00 PST 2003


On Thu, Mar 27, 2003 at 10:30:36AM -0800, Dave Cooper wrote:
> OK, I blew it...
>  RedHat 8 server, put into production a little to fast. I have 2 18G 
> drives that I wanted to raid 1 with.. Instead I have mount points on both 
> drives not in raid 1.. I dont have a local backup device.. Anyone want to 
> recommend ( or tell me "I'm Screwed" ) a way to : on the fly convert a 
> running system from /dev/sda and /dev/sdb to /dev/rd0...

It's doable.

I've done it.

Well, it's "/dev/md0", but, hey...  whatever...  I did it with software
raid, not hardware...  But either way the basic process is the same.

(since software raid is on a partition-by partition basis, I actually have
/dev/hda and /dev/hde partitioned the same, and /dev/md0 is hda3+hde3,
md1=hde1+hda1, md2=e1+a1, md3=e6+a6, 4=a7+e7.  /dev/hda2 and /dev/hde2
aren't raid, they're separate swaps at the same priority level)

0) back stuff up?
1) Get everything over to a single drive, I'll say "sda", but whichever.
2) Set up the *other* drive (sdb) as a raid1 that's in the "a drive died on
   me" failure mode.  Now "sdb" is also "rd0" or "md0".
3) Copy all data over to the md0 drive.
4) do lilo/grub tricks so that md0 is bootable.
5) boot off md0; possibly with sda disconnected.
6) once you've determined that all is well with md0, tell it to add sda to
   the array.
7) wait for it to build the array and then enjoy RAID-1 happiness.
8) go to lunch.
-- 
Eric Eisenhart
NBLUG Co-Founder & President Pro Tempore
The North Bay Linux Users Group
http://nblug.org/
eric at nblug.org, IRC: Freiheit at freenode, AIM: falschfreiheit, ICQ: 48217244



More information about the talk mailing list