If I have a RAID5 with 4x1TB drives, and then in, say, a year I decide to upgrade to 4x2TB, can I swap out one drive at a time, then let the parity rebuild, even if it's mixed-size drives?

Obviously I don't want to have to backup all 4TB to another RAID in order to expand.

Is there a difference in this regard between RAID5 and RAIDZ?

  • I don't think so. See here for more details – soandos Jun 6 '11 at 19:31
  • It depends on what kind of RAID you are talking about. Is this a hardware raid? Linux software raid? Fakeraid? Something else? – psusi Jun 7 '11 at 3:12

This is possible with RAID-Z, as described by the ZFS Administration Guide:

When a replacement device that is greater in size than the device it is replacing is added to a pool, is not automatically expanded to its full size. The autoexpand pool property value determines whether a pool is expanded to its full size when the disk is added to the pool. By default, the autoexpand property is disabled. You can enable this property to expand a pool's size before or after the larger disk is added to the pool.

This is not necessarily recommended, because resilvering the drives after each replacement can take a long time, and the process can be stressful on the drives.

  • Check out the zpool replace command. – Hydaral Jun 7 '11 at 1:31

Sure, you can enlarge your RAID5 volume this way. I've did it with Linux MD RAID and with hardware RAID card.

Just don't forget, that after enlarging RAID volume, you need to resize partition table and then resize the filesystem.


In general no, you can't increase disk capacity like that. You'll end up with 4 2TB drives using 1TB on each. Some hardware RAID setups may allow you to enlarge on the fly (beyond just adding disks), but they are few and far between.

In the end, back it all up to another spot, blow away the array, rebuild it to maximum capacity and restore.

I mean are you really planning on swapping all your production/data drives (which are obviously important due to the bother someone spent putting them in a RAID5) without ensuring a solid backup first?? :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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