Moving raid-0 to raid-1

Moving raid-0 to raid-1

Post by Ken Win » Sun, 20 Jul 2003 06:18:42



So here's the situation I've been given.  I've got a server running RH
8.0 with 4 scsi drive slots.  Two of the drives act as the /boot and
/swap space, both running software raid-1.  There's a third /
partition on these drives running raid-0.  The other two drives are
striped raid-1 and hold the /home partition.


Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/md2              32715904   1924524  29129468   7% /
/dev/md0                101018     25674     70128  27% /boot
/dev/md4              70556976    134456  66838424   1% /home

Personalities : [raid0] [raid1]
read_ahead 1024 sectors
md0 : active raid1 sdb1[1] sda1[0]
      104320 blocks [2/2] [UU]

md1 : active raid1 sdb2[1] sda2[0]
      1052160 blocks [2/2] [UU]

md2 : active raid0 sdb3[1] sda3[0]
      33238272 blocks 64k chunks

md4 : active raid1 sdd1[2] sdc1[0]
      71681920 blocks [2/2] [UU]

What I've been asked is to find a way to change the raid-0 partition
into a raid-1 stripe set.  The hope is that this is possible without a
complete reformat and reinstall of everything, rather some type of
backup and recopy.  I realize I'm going to need to rebuild this drive
set anyway as the space available will drop in half, but I'm looking
to know how possible it would be to back this up somewhere and rebuild
it later.

Is there anyway I can migrate my root system over to the /home drive
and use that while I rebuild?  Any recommendations on how best to
backup the drives somewhere else?  I can probably dump the /home
drives and put two other drives in those slots to use, so long as RH
won't mind running without /home for a bit...I'm not sure that'd work.

Thanks for any advice you might have...

...ken

 
 
 

Moving raid-0 to raid-1

Post by David Utidjia » Mon, 21 Jul 2003 12:51:43



> So here's the situation I've been given.  I've got a server running RH
> 8.0 with 4 scsi drive slots.  Two of the drives act as the /boot and
> /swap space, both running software raid-1.  There's a third /
> partition on these drives running raid-0.  The other two drives are
> striped raid-1 and hold the /home partition.


> Filesystem           1K-blocks      Used Available Use% Mounted on
> /dev/md2              32715904   1924524  29129468   7% /
> /dev/md0                101018     25674     70128  27% /boot
> /dev/md4              70556976    134456  66838424   1% /home

> Personalities : [raid0] [raid1]
> read_ahead 1024 sectors
> md0 : active raid1 sdb1[1] sda1[0]
>       104320 blocks [2/2] [UU]

> md1 : active raid1 sdb2[1] sda2[0]
>       1052160 blocks [2/2] [UU]

> md2 : active raid0 sdb3[1] sda3[0]
>       33238272 blocks 64k chunks

> md4 : active raid1 sdd1[2] sdc1[0]
>       71681920 blocks [2/2] [UU]

> What I've been asked is to find a way to change the raid-0 partition
> into a raid-1 stripe set.  The hope is that this is possible without a
> complete reformat and reinstall of everything, rather some type of
> backup and recopy.  I realize I'm going to need to rebuild this drive
> set anyway as the space available will drop in half, but I'm looking
> to know how possible it would be to back this up somewhere and rebuild
> it later.

> Is there anyway I can migrate my root system over to the /home drive
> and use that while I rebuild?  Any recommendations on how best to
> backup the drives somewhere else?  I can probably dump the /home
> drives and put two other drives in those slots to use, so long as RH
> won't mind running without /home for a bit...I'm not sure that'd work.

> Thanks for any advice you might have...

Ken, thanks for the verbose info on your layout.

1. If the setup you have on /dev/md0 and /dev/md2 is important then dump
it to /home.

2. Otherwise it would be simplest to just re-install. You can do this
without touching the /home partitions/devices (you could even unplug them
when you re-install). In any case... make a copy to /home.

3. If re-install is not really an option... copy the / over to /home.

4. Boot from CD and type in "linux rescue" (without the quotes).

5. Make your adjustments to /dev/sdb.

6. Start the new RAID1 array.

7. Copy the old / back to the new /dev/md2.

8. BEFORE you reboot make the adjustments to /etc/raidtab.

9. Make sure the "new" raid array will mount and umount cleanly and that
everything behaves as expected.

10. Cross your fingers and reboot.

Couple of notes... in general there is really nothing to be gained from
using RAID0 (and a LOT to be lost). Disks are cheap and big so RAID1 is
the way to go (or RAID5).
There is nothing to be gained from making swap a software raid array.
The Linux swap mechanism can already handle multiple disks or multiple
partitions.

-DU-...etc...

 
 
 

1. How to move from software-RAID to hardware-RAID?

Right now I am using software RAID-1 to mirror several disks (120GB drives x
4) for two separate mirror partitions (md0 and md1).

I would like to install a hardware-based RAID card to handle this (instead
of the Linux kernel).  Is there a fairly safe way to do this without having
to copy all the data on these drives to someplace else?  The drives are
pretty much full, so I have 120GB x 2 worth of data that I would need to put
somewhere.

I don't know that much about RAID itself, but is it a standard like "IDE" is
a standard (i.e. an IDE drive will work in practically any IDE controller)?

Any suggestions welcome...

BTW I am running RH 8.0.

Thanks,

2. X window config error 17.0

3. RAID RAID RAID

4. solaris7 or 8 sparc + raid5

5. Raid performace issues (Raid 5 vs. Raid 0+1) with database files

6. Xconfig ? Chipset ?

7. What is the correct procedure to transfer (hda+hdb) raid-1 to (hda+hdc) raid-1

8. Networking problem

9. What is the correct procedure to transfer hda+hdb raid-1 => hda+hdc raid-1 ?

10. HPT370 RAID-1 or Software RAID-1, what's "best"?

11. Software-RAID (RAID-1) with Mandrake 6.0

12. Mounting a RAID-0 partition on an IDE-SCSI/RAID Promise Lite controller

13. Intel Solaris8 and Compaq with RAID (RAID-1) controller