Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I run a software raid array for my backups, but my data has outgrown capacity.

considering I have a full 2.4TB array with 5*600GB drives and also have 5*2TB drives I would like to swap in.

What would be the nicest way to upgrade the array?

I thought of faulting 1 drive at a time and swapping in a new drive and rebuilding, but I am not sure if at the end of the process I will be able to resize the array

Thoughts?

share|improve this question
    
Out of curiosity, did you slide down an order of magnitude by accident, meaning you have 2.4TB with 5*600GB drives? –  Matt Simmons Aug 11 '10 at 2:14
    
@Matt ... big oops on my side :) –  Sam Saffron Aug 11 '10 at 2:38
3  
No worries...if you didn't, I was going to ship you an 8GB flash drive keychain out of mercy :-) –  Matt Simmons Aug 11 '10 at 2:39
add comment

2 Answers

up vote 5 down vote accepted

Assuming this is linux, this is doable and pretty easy actually. It is covered on the software raid wiki but the basic steps are:

  1. Fail and remove drive.
  2. Replace with a larger drive.
  3. Partition the drive so the partitions are the same size or larger than the ones in the existing software raid partition.
  4. Add the partitions to software RAID and wait for it to sync.
  5. Repeat above steps until all drives have been replaced.
  6. mdadm --grow /dev/mdX --size=max to resize the mdadm device.
  7. resize2fs /dev/mdX to resize the file system assuming you have ext3.

You can grow the mdadm device and the file system while the server is live too. If your drives are hot swappable you can do everything without downtime.

share|improve this answer
add comment

On hardware RAID controllers, rebuilding an array with larger disks won't result in a larger array. Previous times, I created new arrays next to the old ones.

My last upgrade plan was:

  1. copy the data on 2 disks (as extra back-up)
  2. Build a new array with the remaining larger disks (RAID 5 will still give you a larger array then the last one)
  3. Move the data to the new array
  4. Remove the old array
  5. Grow the new array with the 2 extra disks
share|improve this answer
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.