The Handbook

    Theme
    • Guides
        • Check a system before installing FreeBSD
        • Orient a Linux administrator on FreeBSD
        • Supported FreeBSD releases
        • Choose a FreeBSD documentation and support channel
        • Move files safely without GNU mv -t
        • Update and Upgrade FreeBSD
        • Upgrade 14.4 or 15.0 to FreeBSD 15.1
        • Choose packages, ports, or poudriere
        • Choose the quarterly or latest package branch
        • Choose a FreeBSD download or package mirror
        • Make a system setting persistent
        • Run a command from cron reliably
        • Configure locale, keyboard, and time zone
        • Configure a serial console for recovery
        • Choose a custom kernel, module, or loader setting
        • Run a Linux binary with the compatibility layer
        • Check desktop and laptop hardware before installation
        • Choose and check a graphics driver
        • Choose Xorg or Wayland
        • Build a maintainable desktop baseline
        • Install and check a desktop browser
        • Check laptop Wi-Fi, power, and suspend
        • Check multimedia readiness
        • Choose and configure a printing stack
        • Run Windows applications with Wine
        • Snapshot and replicate a ZFS dataset
        • Choose a filesystem and storage layout
        • Operate ZFS without losing the recovery path
        • Restore files from a ZFS snapshot
        • Find what is using ZFS space
        • Grow a ZFS virtual disk
        • Read ZFS pool health and run a scrub
        • Replace a failed device in a ZFS mirror
        • Replicate a ZFS dataset over SSH
        • Change PF safely on a remote host
        • Configure a narrow WireGuard tunnel
        • Share a directory with NFS
        • Share files with a named Samba account
        • Plan a FreeBSD home server
        • Choose a mail server or an outgoing relay
        • Publish a network service safely
        • Choose a jail network model
        • Choose native jails or a jail manager
        • Choose a jail or a bhyve virtual machine
        • Establish a FreeBSD security baseline
        • Choose a MAC policy
        • Audit security-relevant activity
        • Start a DTrace performance investigation
    • Integrations
        • Create a first jail with Bastille
        • Compare jail managers and OCI tooling
        • Publish a Bastille service through PF
        • Mount a ZFS dataset in a Bastille jail
        • Update and upgrade Bastille jails
        • Back up and restore a Bastille jail
        • Prepare bhyve and vm-bhyve
        • Choose NFS or Samba for file sharing
        • Choose ZFS backup automation
        • Build a first signed poudriere repository
        • Operate a signed poudriere repository
        • Manage FreeBSD configuration with Ansible or Salt
        • Run Motion with webcamd on FreeBSD
        • Design a reverse proxy, certificates, and monitoring
    • FAQ
      • Troubleshooting
          • Recover an interrupted freebsd-update run
          • Resolve a package repository or ABI mismatch
          • Diagnose the FreeBSD boot path
          • Recover with a ZFS boot environment
          • Diagnose DNS, routing, and firewall paths
          • Diagnose network mbuf exhaustion
          • Bind a service to a low port without running it as root
          • Diagnose a service that will not start
          • Diagnose audio output or input
          • Diagnose webcamd, cuse, and a webcam
          • Fix USB device permissions without opening every device
      • About this handbook
      • Synopsis
      • Identify the disk and partition
      • Enlarge the virtual disk
      • Expand GPT and the last partition
      • Expand the pool and verify writes
      • Primary references

      Grow a ZFS virtual disk

      Last reviewed
      7 November 2026
      Applies to
      15.1-RELEASE
      Tested on
      15.1-RELEASE

      Synopsis #

      Increasing a virtual disk does not necessarily enlarge its GPT partition or ZFS pool. Expand these layers in order, then check the space available to the affected dataset.

      This procedure covers an unencrypted, single-disk pool whose freebsd-zfs partition is the last partition on a GPT disk. It does not cover mirrors, RAIDZ, GELI, intervening partitions, or shrinking storage. Preserve a restorable backup and console access before changing the disk layout.

      Identify the disk and partition #

      Record the pool provider and the complete partition layout:

      $ zpool status -P zroot
      $ zpool list zroot
      $ gpart show
      $ df -h /
      

      The example below uses pool zroot, disk vtbd0, and its last partition vtbd0p5. Substitute the actual pool, disk, and partition index from these reports. Stop if the provider is encrypted or another partition follows it.

      Save the partition table outside the affected disk:

      # gpart backup vtbd0 > /path/on/backup-storage/vtbd0.gpart
      

      That file records partition metadata; it does not back up files or ZFS data.

      Enlarge the virtual disk #

      Use the hypervisor’s supported disk-expansion operation. Follow its requirement for shutting down or rescanning the guest. Do not edit an image with an offline disk utility while the hypervisor has it open.

      Inside FreeBSD, confirm the larger disk size before changing partitions:

      $ diskinfo /dev/vtbd0
      $ gpart show vtbd0
      

      The third diskinfo field is the media size in bytes. If it still reports the old size, complete the hypervisor’s rescan procedure or reboot the guest. Do not proceed by guessing the new sector count.

      Expand GPT and the last partition #

      After disk growth, GPT’s backup metadata may still refer to the former end of the disk. Recover the metadata to the new end, then inspect the layout:

      # gpart recover vtbd0
      $ gpart show vtbd0
      

      An already valid GPT can report that recovery is unnecessary. Confirm that the extra free space follows the existing ZFS partition. Resize that partition without supplying a size so it consumes the available trailing space:

      # gpart resize -i 5 vtbd0
      $ gpart show vtbd0
      

      Do not delete and recreate the partition. Its starting sector and existing contents must remain intact.

      Expand the pool and verify writes #

      Tell ZFS to use the enlarged provider:

      # zpool online -e zroot /dev/vtbd0p5
      $ zpool list zroot
      $ zpool status -P zroot
      $ df -h /
      

      Use the provider recorded from this pool, accounting for any GPT label it uses. growfs is for UFS and is not the expansion command for ZFS.

      Confirm that the pool remains ONLINE, its size increased, existing files are readable, and the original workload can write. Repeat these checks after a controlled reboot. If the pool grew but a dataset still lacks space, inspect its quotas, reservations, and snapshot use with Find what is using ZFS space .

      Primary references #

      • gpart(8)
      • diskinfo(8)
      • zpool-online(8)

      Independent documentation. Not affiliated with or endorsed by the FreeBSD Project or the FreeBSD Foundation.

      Report a bug
      • Synopsis
      • Identify the disk and partition
      • Enlarge the virtual disk
      • Expand GPT and the last partition
      • Expand the pool and verify writes
      • Primary references