Migrate to larger raid 1 vol

Rashkae ubuntu at tigershaunt.com
Thu Jun 19 12:49:55 UTC 2014


On 14-06-19 08:09 AM, Darko Gavrilovic wrote:
> Hi. I run a 12.04 LTS server system with a RAID 1 mirror made up if 2 x 1tb
> drives. I want to migrate to a larger RAID 1 mirror made up of 2 x 3tb
> drives. It there any way to do this "in place" without having to backup and
> restore and/or reinstall packages?
>
>

Yepp.. you can do with both drives at the same time if you have 2 free 
sata ports, or just one drive at a time.

(Note, I'm assuming a linux software md raid array,  process will be 
different for whatever flavor of hardware or dm raid array you might be 
using.)

Some of these procedures are a little risky.  You really *should* at 
least have a backup in case something goes south, and only attempt this 
with a known working UPS.

Add the new drive(s) to your system, create the appropriate paritions, 
of the apprpriate size.

Use mdadm --add to add the new partition on the new drive to your array

use mdadm --fail to fail one of the old ones  (Only one drive at a 
time).  The raid array should proceed to sync all the data to the new 
drive.  Repeat for each partition, and for each old 1TB drive.  (check 
synching status with cat /etc/mdstat)

When your array is finished migrating to all new 3TB drives, you can use 
mdadm --grow --size=max to increase the storage size of the array to 
fill the larger partitions.

Then you have to increase the size of your filesystems.  Most 
filesystems support growing size in place.






More information about the ubuntu-users mailing list