Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

On my home file server, I've got a 1.5TB software RAID5 array, built from four 500gb Western Digital drives. I've got a fifth drive that I usually run as a hot spare (but have out of the array at the moment), but if I can I'd like to add that to the array and grow it to 2TB since I'm running out of space.

I Googled for guidance, but there seem to be a lot of differing opinions out there (many of them probably now out-of-date) as to whether or not that is possible and/or smart. What's the right way to go about this, or should I start looking into building a new array with more space?

Version details:

%> cat /etc/issue
Debian GNU/Linux 5.0 \n \l

%> uname -a
Linux magrathea 2.6.26-1-686-bigmem #1 SMP Sat Jan 10 19:13:22 UTC 2009 i686 GNU/Linux

%> /sbin/mdadm --version
mdadm - v2.6.7.2 - 14th November 2008

%> cat /proc/mdstat 
Personalities : [raid1] [raid6] [raid5] [raid4] 
md1 : active raid1 hdc1[0] hdd1[1]
      293033536 blocks [2/2] [UU]

md0 : active raid5 sde1[3] sda1[0] sdc1[2] sdb1[1]
      1465151808 blocks level 5, 64k chunk, algorithm 2 [4/4] [UUUU]
share|improve this question

2 Answers 2

Do you temporarily have another drive you could attach? If so...

mdadm --grow --raid-devices=5 --backup-file=/mnt/independent_drive/grow_md0.bak /dev/md0

It's reasonably safe but if you're really worried about it, back it all up first. Also, I'd recommend upgrading mdadm as far as you can. This process will take a long time. It could take a day. If you can backup the data, making a new array would be faster. I haven't personally grown a RAID5 but I don't see it being too problematic.

share|improve this answer

The main problem you can run into, why many people might advise against growing a RAID5: during the upgrade process, your data is not protected from disk failure. And the process takes a long time, and taxes the HDDs...so if one is close to failing, all this extra work can push it over the edge. Really I say just buy a new HDD...these days a single 1.5TB drive can be had for $90 if you catch the right sale. I'm personally of the opinion that it's not worth risking losing all my data just to try and save a few bucks.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.