LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Replacing drives in a software raid 5 (Ubuntu 10.10) (https://www.linuxquestions.org/questions/linux-hardware-18/replacing-drives-in-a-software-raid-5-ubuntu-10-10-a-838320/)

alecjtaylor 10-15-2010 01:35 PM

Replacing drives in a software raid 5 (Ubuntu 10.10)
 
Hi Guys,

This is the first question I've had to post in 2 years of using linux, who says its not easy to use :D! Anyway down to business....

I've got a 3x400gig software raid 5 array running on Ubuntu 10.10 in my file server. The array is running well and was installed and managed by mdadm.

I'd like to add more capacity to the array but I don't have enough spare sata ports to set up a larger capacity array and move the data across.

Would it be possible to swap, one by one, the 400gig drives with larger drives to increase the size of my current array? i.e. have 2 400gig drives and 1 larger drive, wait until the array has rebuilt, add another drive, wait until its rebuilt, add the final drive, then hopefully increase the storage capacity of the array?

I am aware you can add drives to an existing raid 5 array but I don't have enough spare ports (or enough space in the case!) to do this.

I've been hunting round many forums for advice but I've not found anything useful so far, any advice you guys can give would be really helpful!


Thanks

Alec

Stephannn 10-15-2010 02:07 PM

Hi Alec,

Unfortunately, I don't believe it will work in that manner; the RAID's size is determined when it's first created.

A couple of better solutions would be to either buy a Terabyte external drive and back the data up to that drive, then swap the smaller drives out for larger ones and build a new array, or to purchase an SATA controller card (a four port SATA PCI controller card runs only around $30) and a larger case, and add additional drives through that controller (up to a total of seven drives at this point.) Bear in mind, if you add (for example) four 1 Terabyte drives through an additional controller, the existing RAID will only be able to add 400 GB per drive, though you could certainly partition the drives and create a second array with the remaining 600 GB per drive.

alecjtaylor 10-16-2010 02:53 PM

Ah, I thought that might be the case!

Thanks for the info Stephannn , I think I'll look into getting a sata card, a second power supply for the new drives and some temporary storage while I migrate the data.

Thanks for clarifying things.

Alec

Stephannn 10-16-2010 03:31 PM

Hi Alec,

Good deal. As a suggestion, if you were to go with the TB drive solution, you could (in practice) connect it through your new SATA controller, copy the data over from your RAID to the one drive (since you'll have a max of 800GB to store), and then set up a RAID 5 array with two disks (starting the array in 'degraded' mode), then copy the data from the first TB drive to the new RAID array, then add that drive to the array. This would let you have just the three drives if that's sufficient for your needs. If you only use four hard drives, you might be able to squeak by with a 'normal' power supply.

alecjtaylor 10-17-2010 12:50 PM

Good idea, however, I've found a better solution. I'll borrow one of the new 4TB portable raid drives we've just ordered at work this week! ;)

Thanks for all the help

Alec


All times are GMT -5. The time now is 11:45 PM.