Growing ZFS pool

recently one of the drives in my storage pool died. Considering that I already was running out of free space:

#zfs list storage
NAME USED AVAIL REFER MOUNTPOINT
storage 3.21T 820G 236K /storage

I decided to not only replace the failed 1.5TB drive but get two 4TB drives and upgrade whole vdev. Imagine my surprise that despite my memory telling me that it should grow on it’s own. It didn’t.

Some searching later I found out that replacing drives is only part of the solution.
First you have to make sure that autoexpand is on

#zpool get autoexpand storage
NAME PROPERTY VALUE SOURCE
storage autoexpand off default

#zpool set autoexpand=on storage
NAME PROPERTY VALUE SOURCE
storage autoexpand on local

That still didn’t do the trick, but I’ve noticed that now it was showing:

#zpool get expandsize storage
NAME PROPERTY VALUE SOURCE
storage expandsize 2.27T -

To make it use that space you need do zpool online -e for all replaced devices:

#zpool online -e storage wwn-0x5000c500654c1adc
#zpool online -e storage wwn-0x5000c500652efbc2

and now:

#zfs list storage
NAME USED AVAIL REFER MOUNTPOINT
storage 3.21T 3.04T 236K /storage

3 thoughts on “Growing ZFS pool”

  1. Thanks for this post! I was wondering why my pool wasn’t expanding when I came across your article. Now it’s working great :)

  2. Thank you. I ran into exactly the same problem. I had set my autoexpand property to ON, but apparently when I updated ZFS, it changed it back to OFF. So I’ve noticed that I have to periodically recheck my config settings to make sure they are where I want them, and not at the defaults.

Leave a Reply

Your email address will not be published. Required fields are marked *