[NBLUG/talk] More hard drive problems

Kyle Rankin kyle at nblug.org
Mon Oct 3 13:39:57 PDT 2005


On Mon, Oct 03, 2005 at 12:44:44PM -0700, Lincoln Peters wrote:
> On Oct 3, 2005, at 10:55 AM, Kyle Rankin wrote:
> >If you did want to change filesystems, basically you'd need at  
> >least 2 new
> >drives.
> 
> That's what I was afraid of.  I'd need to get my hands on 2 new hard  
> drives, each one being at least 300GB, to change filesystems.  That's  
> not likely on my budget.
> 
> >You'd set up a degraded RAID5 on the new drives, format with the
> >new filesystem (I'd recommend XFS) and then copy all the files  
> >over. Once
> >they are copied over you can hot-add the last drive to the array  
> >and have
> >it sync.
> 
> Actually, I think I can see a way that I could make this work with  
> just one new hard disk that's at least 250GB.  I'd detach one of the  
> three disks from the existing array (not applicable to my situation  
> since one is already detached), create a new degraded RAID5 array as  
> per your suggestion, copy everything from the old RAID array to the  
> new one, shut down the old array, then attach one of the two  
> remaining drives from the old array to the new one so that it can "un- 
> degrade" itself.
[snip]

Unless I'm misunderstanding you, that's basically what I meant by saying
you need 2 new drives--one to replace your failed drive, and a new one.
I'll lay it out a bit more in detail (and with some ASCII art!). 

Step 1)

Let's say your current RAID5 is made up of three drives, a, b, and c
(currently degraded):

  oldRAID5
[a+][b+][c-]

Step 2)

You get the replacement drive (still called c) and a new transitional drive
that's large enough for the transition (call it d). Remove c from the old
RAID and create a new degraded RAID5 with it and d

Transitional setup:

  oldRAID5     newRAID5 
[a+][b+][-]  [c+][d+][-]

Step 3)

Now format newRAID5 with your new filesystem, and copy all the files from
oldRAID5. Once it has copied over, you need to break oldRAID5 by removing
drive a from it and hot-adding it to newRAID5:

  oldRAID5    newRAID5 
[-][b+][-]  [c+][d+][a+]

Step 4)

With this done, if you only borrowed drive d from someone for the purposes
of the transition, you can hot-remove it, and swap in drive b and be back
to where you started from:

 oldRAID5    newRAID5 
[-][-][-]  [c+][b+][a+] 

This technique basically requires you to at least temporarily borrow a
drive from someone. Yes I suppose you do risk data loss during Step 3
because you do have to break the old RAID to hot-add the drive, but again a
comet could hit your house too. This transition time is only probably a few
hours to perhaps a full day for a 200-300Gb drive. If you are
super-paranoid I suppose you could borrow two drives from someone and make
sure that you always have at least one complete RAID.

-- 
Kyle Rankin
NBLUG President
The North Bay Linux Users Group
http://nblug.org
IRC: greenfly at irc.freenode.net #nblug 
kyle at nblug.org



More information about the talk mailing list