Growing / expanding ZFS pools on Linux Print

  • zfs, grow, expand, resize, upgrade, zfs on linux, parted, gparted, vmware, kvm, centos, ubuntu
  • 1

So you've installed ZFS for Linux on your virtual server, and then ran out of space. Not a problem - it's super easy to upgrade to the next size up. But wait... what about the ZFS zpool? Will that resize?

The answer is yes, but, you need a little trickery to make it work. Here's how you do it:

  1. Upgrade your VM storage or plan to the next size up

  2. Typically you'll need to power off and power on the VM to apply the storage upgrade

  3. Once you've booted back up, ensure your disk upgrade went through successfully:
    log in via SSH and run df -h and check the disk size

  4. Now we will list the partitons on the server and find out which one ZFS is using:
    let's use parted -l

  5. Once you've found your partition, use parted to resize it. Assuming it is vda and partition 2:
    execute parted /dev/vda resizepart 2 100%

  6. Finally, we want to use ZFS expand to make use of the extra space:
    use zpool online -e zpool /dev/vda2 altering the zpool name and partition accordingly.

Was this answer helpful?

« Back