After expanding the disk for VM and using gpart resize, and setting autoexpand=on the pool does still not getting added space: # zpool list NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT zroot 13.9G 11.5G 2.34G 4G 71% 83% 1.00x ONLINE - # zpool get autoexpand NAME PROPERTY VALUE SOURCE zroot autoexpand on local # zpool export zroot # zpool list no pools available # zpool import -N zroot # zpool list NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT zroot 13.9G 11.5G 2.35G 4G 71% 83% 1.00x ONLINE - no change. however: # zpool reopen zroot # zpool list NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT zroot 17.9G 11.5G 6.34G - 55% 64% 1.00x ONLINE - but the interesting fact is, this session is done from cd boot; when zroot was booted from, even zpool reopen did not trigger the resize.
Does running the following expand it: zpool online -e <pool> <device>
The process we've used in the past is details here: http://blog.multiplay.co.uk/2016/05/resizing-a-freebsd-zfs-pool/
well, except once your disk is resized and partition size is fixed, the only thing you *supposed to do is to zpool set autoexpand=on and then off, or definitely it should get expanded with autoexpand=on on system reboot. zpool offline on your only disk in your boot poool does not seem to be very wise action to take;)
No mention of offline, just online. The fact its already online at the time doesn't matter ;-)
(In reply to Steven Hartland from comment #4) oh, right, my mistake. well, the point is, you shouldn't need even that:) but as an workaround, it is valid point. So, it means, whatever is fbsd port doing on zpool online, should also be done when autoexpand is getting set, and on zpool import (either from command line or at boot time) - that should fix this issue:)
I believe autoexpand is only triggered in two cases: 1. Replacement of vdev. 2. When autoexpand is enabled. I don't think that a straight pool open or reopen triggers the expansion. Useful info can be found here: http://docs.oracle.com/cd/E19253-01/819-5461/githb/index.html