Growing / expanding ZFS pools on Linux

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.
  • zfs, grow, expand, resize, upgrade, zfs on linux, parted, gparted, vmware, kvm, centos, ubuntu
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

How to resize LVM partitions

Sometimes when users install their operating systems from ISOs manually, they choose to install...

Archiving old content (tar gzip)

In this article we'll explain how and why you should archive your old content - particularly...

Choosing the best DNS resolvers for a server

Customers often ask us what we'd recommend they use as DNS resolvers on their server. This...

Speed up & secure cloud servers with more Entropy

In Linux, Entropy refers to randomness that is generated by a virtual random number generator,...