[nSLUG] Best way to upgrade mirrored disks to larger capacity?

George N. White III gnwiii at gmail.com
Wed May 11 11:37:19 ADT 2011


On Wed, May 11, 2011 at 9:16 AM, D G Teed <donald.teed at gmail.com> wrote:
>
> I'm coming up on a couple of systems running mirrored software RAID
> where I'd like to swap out smaller disks for a pair of 1 TB disks.
> In both cases there is 200GB or more of disk used, and the
> partitions include / root partition.
>
> There are SATA connectors for only 2 drives on the mainboard
> and they are not hot swappable.

These days it is often cheaper to add hardware than to spend
sysadmin time.

I'd get a couple eSATA cases and add a couple eSATA connectors
with a PCI card: <http://www.lacie.com/products/product.htm?id=10331>

This way you should be able to set up and populate the new drives
with only a few minutes powered off to install the PCI card.  You should
be able to boot from them to make sure everything is configured
properly and capture any changes that occurred after the initial
copy, so another short interval off-line.   Now the system is
running on the external drives, so you can leave them for a trial period,
then power off to swap them into the system, and off you go.


> Of course it would be nice to minimize downtime.
>
> I can think of a couple of ways of upgrading the disks while attempting
> to keep things running as much as possible.
>
> One method is:
>
> - degrade the mirrors by removing one disk from the RAID configuration (fail
> then remove)
> - power down and swap the disk removed from the mirror with a higher
> capacity
> - boot from old disk and set up new, "missing disk" RAID partitions on new
> disk
> - boot from rescue CDROM disk and copy partitions from old to new
> - install grub on new disk
> - power down and add second new disk, boot from first new disk
> - set up partitions on second new disk, add into array
> - install grub on second new disk
>
> Another approach would be similar, but to clone (dd) the old partitions to
> new,
> and grow the file system (mdadm --grow /  resize2fs) on the higher capacity.
>
> There might be other approaches these days.
> If this is the last growth in the life of the system,
> I don't see the value of getting into LVM.  It is also
> a bit tricky to find guides on LVM which are up to
> date for LVM2.  What are hints to indicate an article
> isn't talking about LVM2?
>
> If anyone has an alternate approach or anything they have learned to
> help keep the downtime to a minimum, I'd like to hear.

Make backups.   This sort of thing stresses I/O controllers and generally
heats things up, so if something was close to failing chances are good it
will happen while you are adding disk capacity.

-- 
George N. White III <aa056 at chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia



More information about the nSLUG mailing list