Upgrade software RAID (10) array

Joined
Sep 8, 2007
Messages
697
Hi, I can't seem to find the right combination of google keywords to find any sort of help, nor do I have the time to troll through man pages...

I currently have a home server which has 5 drive bays, 1 is the system drive (which I don't need to touch) and the other 4 are 1TB drives running in a RAID 10 setup. I'm slowly running out of space on the array and was wondering if there is an easier way to upgrade the drives in the array to 2 TB drives than to backup the data somewhere***, pull out all the drives, put in the new ones, build a new array and to then copy the data back into place.

***(I'd backup any important stuff to the system drive and the other computers scattered around home and/or work)

I thought I remembered reading something about how linux software raid and LVM works, such that using drives of varying capacity in a RAID array was possible, but I honestly can't wrap my head around the non-windowsness well enough to understand how###.

Can anyone help me either understand or give me a high-level how-to?

aka: pull out drive, do these tasks with LVM or this kind of partitioning on it, etc
rebuild array

###(At one point I spent 6 hours reading the official LVM page desperately wanting to understand it, and all I managed to figure out was that it was total awesome-sauce, but how it all worked, I couldn't really picture.)


Thanks for anyone who can help.

Andrew
 
It is possible to do this kind of migration in-place (assuming you intend to swap all 4 1TB drives with 2TB replacements), but it is a bit 'dangerous' since it involves leaving the array in a degraded state and rebuilding several times.

Basically it'd go like this:

1) unmount the filesystems on the array read-only. don't mount them again until you've upgraded the array
2) use mdadm to intentionally fail one of the 1TB disks, then remove it from the server
3) replace the disk with a new 2TB one and add it to the array with mdadm
4) verify the correct disk was swapped and wait for the rebuild to complete
5) if there are still disks to swap go to step 2
6) use mdadm to grow the array to the new size
6a) if you use LVM, use pvresize to grow the physical volume

Then you can grow the LVs and/or filesystems as necessary onto the new space.

Though since you're replacing the whole array, I'd suggest you just buy a cheap PCI SATA controller for one-time use migrating the data from the old array to the new one. It's much safer and probably faster.

Or is that not what you were asking?
 
I'm with keenan, I wouldn't do it the way he outlined. Get a separate sata controller, or even an external harddrive to store the data on.
 
Thanks for that, I'm using one of these: http://www.tranquilpc-shop.co.uk/acatalog/BAREBONE_SERVER_Series_2.html so the PCI Controller idea isn't really an option.

Otherwise I would just create a new array and leave the old one running. I'm tempted to try the dangerous method, at least so that I can get some experience with using MDADM and LVM other than the initital build which was easy.

The data would of course be backed up, at least anything important. (if I lose movies/TV shows I ripped from their DVDs or my backed up games I'm not going to cry much as they are on the shelf, if I lose any of the thousands of photos or financial data, that would suck).
 
You could pull the disks out and temporarily place them in a different machine to do the migration. As long as the kernels are of similar vintage this will work fine. Or just build the new array on a normal PC, copy the data over the network and then swap the disks into the server.
 
Back
Top