[Techtalk] Software RAID

Conor Daly conor.daly at oceanfree.net
Wed Sep 4 17:07:51 EST 2002


On Tue, Sep 03, 2002 at 04:21:45PM -0700 or so it is rumoured hereabouts, 
Kai MacTane thought:
> At 9/1/02 04:11 PM , Conor Daly wrote:
> 
> >AFAICT you can do it with only two extra drives (Maybe you could borrow a
> >temp drive?).  It goes something like:
> >
> >1. Create a RAID 0 striped array on two blank disks.
> >2. Copy data onto RAID 0 set.
> >3. Sacrifice one of the original data disks to be the parity disk.
> >4. Edit /etc/raidtab (or whatever it's called) to specify a RAID 3
> >    and to include disk 3 as the parity disk.
> >5. Have the RAID 3 set "rebuild" its parity disk.
> >
> >That gets you your 3 disk RAID with only the cost of the third disk, if
> >you get to borrow a temporary one that is...
> 
> That sounds like a good plan, although I don't think I understand what your 
> plan is with the _temporary_ drive... wouldn't I want to keep the parity 
> information around?
 
The temporary drive is going to hold the data from one of your two
existing drives.  You said you already have two drives with data on.  Unless 
the data will all fit onto one drive, you're going to need to store it
somewhere while you make the RAID set.  It's the multi disk version of the
same old partition juggling you do when you don't have a backup.  If you
have only one existing drive, you won't need a temporary.

> It sounds like all I really need are the drives for the new RAID data 
> volume. Create the RAID 0 volume, copy the data from the "old data" drive, 
> then turn that "old data" drive into the parity drive (thus overwriting the 
> old data, but not until I know it's been copied onto the RAID 0 volume... 
> that's becoming a RAID 3 volume at the same time as the old data is being 
> overwritten).
> 
> Have I got that right?

That's pretty much it.  Given your two existing disks, you won't be able
to make the RAID 0 array without _two_ more disks (assuming there's more
data on the two disks than will fit on one).  I'm thinking something
like this:

Lets number the disks...  You have data on two disks, call them 1 and 2.
You purchase a third disk, call that 3.  You borrow another, call it 4.

a) copy the contents of disk 2 to disk 4.  Disks 2 and 3 are now free
   space.
b) make the RAID 0 array using disks 2 and 3.  The data on disk 2 is now
   destroyed.
c) copy the data from disk 1 to the RAID 0 array.  You data now exists
   between disks 4 and the RAID 0 array.
d) copy the data from disk 4 to the RAID 0 array.  All of your data is now
   in the RAID array.  It's also on disks 1 and 4 at the moment.
e) incorporate disk 1 into the RAID array making it the parity disk for a
   RAID 3 set.  
f) blank disk 4 and return to its proper owner.
g) roundly curse Conor's name when you discover that the process of making
   a parity disk has deleted all of your data!

If I understand RAID correctly, RAID 0 and RAID 3 are the same apart from
the parity disk in RAID 3.  If the parity disk gets replaced, it should
get rebuilt from the other two.  You may need to run something to do the
actual rebuild, I don't think it's automatic.

Conor
-- 
Conor Daly <conor.daly at oceanfree.net>

Domestic Sysadmin :-)
---------------------
Faenor.cod.ie
  4:49pm  up 4 days, 21:16,  0 users,  load average: 0.15, 0.03, 0.01
Hobbiton.cod.ie
  4:50pm  up 4 days, 20:59,  1 user,  load average: 0.14, 0.11, 0.05



More information about the Techtalk mailing list