Re: Upgrading mdadm-based RAID arrays



Got an answer: RTFM! :-)

-z, --size=
[...]
This value can be set with --grow for RAID level 1/4/5/6. If the
array was created with a size smaller than the currently active
drives, the extra space can be accessed using --grow. The size
can be given as max which means to choose the largest size that
fits on all current drives.




Tyler MacDonald <tyler@xxxxxx> wrote:
Hello debian!

I have a RAID-5 mdadm array with 4x500GB drives (1.4TB usable). I'm
running out of space and am going to buy a new drive, but I would like to
move to 1TB drives (either RAID-5 or RAID-10, haven't quite decided yet). I
can't afford to buy all new 1TB drives at once so I'm thinking about just
adding a fifth drive to the array now, and then upgrading the remaining
drives as I can afford it.

I've dug around trying to find information on how to do this and haven't
seen anything yet. I've imagined the process to be something like: ("Plan
A")

1. One-by-one, replace the 500GB drives with 1TB drives, rebuilding the
array using only the first 500GB of each drive.

2. Once all drives are 1TB, do something to tell mdadm to reshape the
array so that the full 1TB from each drive is used

3. e2fsck -f /dev/md0 && resize2fs /dev/md0

Does step #2 exist? If so, how is it done?

If that's not possible, I'm considering the following plan: ("Plan B")

1. Buy 2x1TB drives, set them up as RAID-5 (1TB usable)

2. Copy 1TB of the 1.4TB to the new array

3. Degrade my existing 4x500GB array, freeing up 1x500GB drive

4. Copy the remaining 400GB to the "spare" drive

5. Tear down the 3x500GB array

6. Set up 2x500GB from the old array as a 1TB RAID-0 stripe

7. Add the 2x500GB RAID-0 to the new RAID-5 as a "1TB drive",
making the new array have 2TB capacity, eg;
mdadm --add /dev/md0 /dev/md1
mdadm --grow /dev/md0 ...

8. Copy the data from the "spare" drive over to the new array

9. Repeat step #7 with the remaining 2x500GB drives, resulting in
3TB capacity on the array

I'd really prefer to go with "Plan A". It's cheaper to get started with,
far less complicated, and doesn't risk data loss during the move.

Any ideas? Is this possible?

Thanks,
Tyler



--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: LSI MegaRAID SAS 9240-4i hangs system at boot
    ... Squeeze, AFAIK, don't do automatic alignment on AF drives. ... Those who want to boot from disks in an md array ... arrays from bare AF disks avoids partition misalignment. ... Local SGI XFS ...
    (Debian-User)
  • [Summary] saving disksuite info while rebuilding server
    ... "Caution - If a full install of Solaris is performed, ... make sure you have tape backups of everything. ... I had an old workgroup storage array with six 18G drives formatted RAID5 ...
    (SunManagers)
  • Re: LSI MegaRAID SAS 9240-4i hangs system at boot
    ... misalignment on advanced format drives. ... That 800TB is carved up into a handful of multi-hundred TB XFS ... A single level md striped array is any linux raid containing disks. ...
    (Debian-User)
  • Re: LSI MegaRAID SAS 9240-4i hangs system at boot
    ... TB disks to it. ... Should I first create an empty array with "mdadm --create ... Don't partition the drives before creating your md array. ... RAID arrays containing partitions are bad. ...
    (Debian-User)
  • Re: LSI MegaRAID SAS 9240-4i hangs system at boot
    ... TB disks to it. ... Should I first create an empty array with "mdadm --create ... Don't partition the drives before creating your md array. ... RAID arrays containing partitions are bad. ...
    (Debian-User)