Sunday, December 1, 2013

Growing a ZFS pool

Growing a two disk mirror zpool by replacing disks is easy:

  1. Replace the first disk with a higher capacity disk (we're going from 2TB to 3TB disks): zpool replace -f pool ata-WDC_WD20EARS-00MVWB0_WD-xxxxxxxxxxxx ata-Hitachi_HDS5C3030BLE630_xxxxxxxxxxxx
  2. Wait for the resilver to complete (about 5h).
  3. Replace the second disk: zpool replace pool ata-ST2000DL003-xxxxxxxxxxxx ata-ST3000DM001-xxxxxxxxxxxx
  4. Wait for the resilver to complete again.
  5. Expand the pool by telling it to use the extra space: zpool online -e pool ata-Hitachi_HDS5C3030BLE630_xxxxxxxxxxxx
  6. Just in case, tell the pool to expand also the other disk: zpool online -e pool ata-ST3000DM001-xxxxxxxxxxxx
Thanks to the following links for describing the procedure:

No comments:

Post a Comment