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
      • Compare the same filesystem
      • Check retained snapshots
      • Check quotas and reservations
      • Look for open files that were deleted
      • Recheck after the chosen correction
      • Primary references

      Find what is using ZFS space

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

      Synopsis #

      Deleting a file does not necessarily free its blocks immediately. ZFS snapshots or clones can retain them, another process can still have the file open, and dataset quotas or reservations can limit available space independently of pool capacity. Identify which condition applies before deleting snapshots or expanding storage.

      The examples use dataset tank/data mounted at /srv/data. Substitute the dataset and mount point reported by the affected system.

      Compare the same filesystem #

      Begin with the affected path and dataset:

      $ df -h /srv/data
      $ du -xsh /srv/data
      $ zfs list -o space tank/data
      $ zpool list
      

      du adds up reachable files; -x avoids crossing into child filesystems. df reports the mounted filesystem’s accounting. zfs list -o space separates the dataset’s own use, snapshots, child datasets, and refreservations. Pool-wide free space is shared and does not mean that every dataset can allocate all of it.

      Compression, sparse files, metadata, and shared blocks also affect comparisons. A difference between these reports is a reason to inspect the accounting, not evidence of filesystem corruption.

      Check retained snapshots #

      Inspect the space categories and snapshot inventory:

      $ zfs get -p used,usedbydataset,usedbysnapshots,usedbychildren,usedbyrefreservation tank/data
      $ zfs list -r -t snapshot -o name,used,refer,creation -s creation tank/data
      

      When a deleted file still exists in a snapshot, those blocks remain allocated. The snapshot’s USED value counts blocks exclusive to that snapshot. Adding individual snapshot USED values can therefore undercount space retained by several snapshots together. Use usedbysnapshots for the dataset’s combined snapshot use.

      Before removing a snapshot, establish its retention purpose and whether a clone or incremental backup still needs it. See Snapshot and replicate a ZFS dataset . Removing the last common replication snapshot can break the next incremental transfer.

      Check quotas and reservations #

      $ zfs get quota,refquota,reservation,refreservation tank/data
      

      A quota can prevent writes while the pool has free space. A reservation can reduce space available to other datasets. Do not remove either merely to make a displayed number larger; confirm the capacity policy and competing workloads first.

      Look for open files that were deleted #

      A process retains access to an open file after its directory entry is removed. Its blocks can remain allocated until the final reference closes. As root, list open files on the affected filesystem:

      # fstat -f /srv/data
      

      Use the process ID to inspect a candidate’s descriptors:

      # procstat -f PID
      

      Replace PID with the observed process ID. An unlinked file may have no recoverable pathname in this output; correlate its inode, size, descriptor, and process with the recent deletion. Do not terminate a process merely because it has a file open. Use the application’s documented log-reopen, reload, or shutdown procedure when the held file is the cause.

      Recheck after the chosen correction #

      Repeat the original df, du, and ZFS space reports after the application closes the file, an approved retention action completes, or the quota policy changes. Space reclamation can be asynchronous. Confirm that the original workload can write again before treating a lower usage number as success.

      Primary references #

      • zfsprops(7)
      • zfsconcepts(7)
      • du(1)
      • df(1)
      • fstat(1)
      • procstat(1)

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

      Report a bug
      • Synopsis
      • Compare the same filesystem
      • Check retained snapshots
      • Check quotas and reservations
      • Look for open files that were deleted
      • Recheck after the chosen correction
      • Primary references