[clue-tech] RAID5

Kevin Fenzi kevin at scrye.com
Sat Dec 16 20:20:12 MST 2006


On Sat, 16 Dec 2006 19:14:38 -0700
lwahlmeier at gmail.com ("Luke Wahlmeier") wrote:

> Well I have heard this question alot.  In general raid 5 is static,
> you can not resize it, once you make the array you are stuck with an
> (base) array that size.  If one drive fails obviously you can run with
> out it, I mean thats what raid 5 is for, but you will be in "degraded"
> mode, meaning that if another drive fails, you lose you array, and
> possibly all data on it.
> 
> There is one tool that does some tricks to allow you to resize a linux
> software array.  It is very dangerous and should only be used if you
> know what you are doing and have a very resent back up
> http://unthought.net/raidreconf/
> 
> Remember there is more to consider here then just resizing the array,
> it more then likely has a files system on it that will have to be
> resized to a size that will fit on the new array.  

Right. The link above seems to have last been modified in 2001. 
In the intervening time someone has merged a patch to linux software
raid that does allow adding drives. 

Did you take a look at the link I posted?

My understanding of how it works: 

- You use mdadm to tell the kernel that you have a new drive you want
to add to the raid5. 
- Linux software raid sees the new drive and carefully copies bits
around so that the new drive has data on it. (or perhaps the new drive
just has parity on it and it moves the old parity drive, not sure) 
(obviously you don't want a power outage or the like here)
- When it's done rebuilding you have N+1 drives in your raid5. 

So, you _can_ grow a raid5 on the fly. 

> 
> 4x18 = 54gb on a raid 5
> if you want to keep redundancy on it and remove a drive you total
> space is going to drop by a drive.
> 3x18 = 36gb
> 
> If you use the resize tool reduce the size of the filesystem to <36gb
> first, or you will loose everything.
> 
> Honestly it would probably be easier to copy everything to another
> drive, destory and remake the array, if thats an option.  

I don't know how stable the raid5 grow code is, but it's in the
mainstream kernel now and I have seen several reports of it working
just fine. 

One of the problems with just moving the data and building a new raid
and moving it back is space. If you have an array thats larger than a
few drives this might not be easily doable. 

kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://cluedenver.org/pipermail/clue-tech/attachments/20061216/c065d027/signature-0001.bin


More information about the clue-tech mailing list