# Resize RAID 5 array

## Voorhees51

I have a 4 port SATA controller card with 4 500GB drives on it.

 They are setup using mdadm software RAID5.  File system is XFS

 I am in the process of getting another 4 port SATA card and 4 more 500GB dives.

 My question is, would it be better to create a new RAID5 array with just the 4 drives on the 2nd card

  and have 2 RAID5 arrays or is it better to grow the existing array using these dives?

 What are the implications performance wise, total storage size (1 vs 2 arrays), etc.

 I also don't have that much on the current array yet, so starting from scratch with them is an option if necessary.

 Any thoughts tips , better ideas are welcome very much.

----------

## gustafson

I would advise against growing them into too large an array.  I have a 4x750GB disks, which I've split into 4 raid 5 arrays.  The effective partition size is still managable when doing filesystem checks etc and maintenance.  File access speed isn't great... I've not done benchmarking, but the performace at that split level is noticeably slower than for smaller partitions.

I'm not an expert at filesystems and the tradeoffs that result from large raid arrays, but if I had it to do over again I probably would make smaller partitions next time.Last edited by gustafson on Wed May 16, 2007 8:28 pm; edited 1 time in total

----------

## eccerr0r

I second the opinion, at least especially with raid5 because as the number of disks increases, the chance of getting two failures grows.

Either keep the two raids on separate volumes, or you could look into raid6 where you could take two failures without loss.  Both ways you lose two disks to redundancy though, so effectively they're equal unless you want a large unified volume - then raid6 is better, and then run LVM on top of the huge raid6.

Depending on what you're storing, either could be good.  I probably would have two separate raid5's so I can move arrays from machine to machine without a rebuild, if needed, to balance CPU load.

----------

## Voorhees51

I think I'll go with the 2 RAID5 arrays approach.

It's just going to be for a media storage server for MythTV so that should be fine.

What would be a good size for partitions then? Since I'm guessing that I shouldn't make it one large partition.

----------

## gustafson

You have 4x500 physical disk.  

If you split each into two physical partitions and configure raid 5 across the disks, you will have

2x 3x250=2x 750GB raid 5 partitions.

My opinion is that this is too big.

I would split that again in two.  Four physical partitions on each ending with.

4x 3x125=4x 375GB raid 5 partitions.

Even that is a huge partition, but perhaps a better balance between complexity and performance.

Just my opinion... I'm sure there are better ones out there.

PS Myth recommends jfs or xfs file systems.

----------

## Mad Merlin

You can reshape (read: add more drives to and resize) a RAID 5 array on the fly, and that's what I'd suggest. Furthermore, you can leave one drive as a hot spare, so you'd have 7 drives in active use, and one sitting idle. In this way, when you lose a drive, that drive is kicked out of the array, and the hot spare is immediately pulled into the array and synced.

RAID 6 is also an option, but it'll really only protect you against 2 disk failures within an hour or two (before the RAID 5 array can sync the hot spare into the array). RAID 6 also has more CPU overhead, and will be much slower when degraded (especially with 2 dead disks).

----------

## gustafson

Mad Merlin is right...

I still think you want to keep to total size of the partitions low... however larger arrays (more disks) are better at least from a storage efficiency perspective.  Unless there are compelling reasons to keep the total disk count down (and there could be many), his suggestion is better in terms of storage efficiency and redundancy.

----------

## Voorhees51

Another question regarding this:

Could I use LVM on top of the software RAID5 to partition it out that way, in case I want to resize the partitions and such?

Is this a good idea so when I want to add more to the array or create another it will be easy to manage.

Thoughts. opinions other ideas much welcomed.

Thanks

----------

## HeissFuss

If you're worried about partition size use LVM on top of the RAID5.  Having multiple raid5 partitions across the same disks is just silly.  If you have an issue with a disk you'd need to sync/check all the partitions anyway.

If you use LVM start the partitions at a conservative size.  XFS and JFS partitions can be extended but not shrunk in linux.

Personally I have one large partition without LVM (4x500GB raid5) and haven't had any problems with it.  For your uses you'll mostly have large files and for the most part will only be reading/writing one or two at a time.  Performance-wise your throughput increases (at least for reads) with the more disks you have in the raid.

----------

## Sujao

How much does performance decrease if you have a big partition and what IS a big partition. For example: How much performance could I gain by splitting a 453GB partition to smaller sizes?

I am going to buy a 500GB drive that I will only use for archiving so I don't really need different partitions. So I am wondering how much performance I will loose compared to an optimal solution.

----------

## RaceTM

If you haven't already, you might want to take a look at this recent thread. It might bring to light some issues you are not aware of!

https://forums.gentoo.org/viewtopic-t-562860-highlight-.html

----------

## gbr

I have 5x250 GB drives in a RAID 5 array, giving me a terabyte of storage.  I've formatted it as one big partition using XFS, and it works like a charm.  Two of the drives are on a USB controller (I know, it was cheap at the time), so a rebuild takes forever.  Other than that, I'm happy.

Gerald

----------

