Flat vector illustration of a NAS enclosure, capacity gauge and rising usage graph approaching a threshold line

TrueNAS Capacity Planning: Forecasting When Your Pool Hits 80%

Pull real pool numbers on a schedule, fit a simple percentage-points-per-day growth model, and let a silent cron nag you only when a threshold is crossed. Includes why the 80% line matters for ZFS and a scrub-watching habit.

Every pool fills up. The only question is whether you find out when it’s a calendar item or a 3 a.m. pager event. My main tank is a single raidz1 of five spinning disks — about 82.75 TiB usable — and for a long time my “capacity planning” was glancing at the dashboard every couple of weeks. That works right up until it doesn’t. Here’s the setup I’ve landed on: pull real numbers on a schedule, fit a simple growth model, and let a silent cron job do the nagging.

1. Start with real numbers, not vibes

The classic mistake is eyeballing the web UI. You want machine-readable output you can trend. On the box itself, zpool list -p gives you raw bytes:

nas:~$ sudo zpool list -p tank
NAME  SIZE         ALLOC        FREE         FRAG  CAP
tank  90984587198464  42520215425024  48464371773440  13%  46%

Since I already talk to the NAS over a read-only API for other automation, I pull the same numbers that way — the JSON gives me size, allocated, free, fragmentation, and the last scrub state in one shot:

{
  "name": "tank",
  "size_bytes": 90984587198464,
  "allocated_bytes": 42520215425024,
  "free_bytes": 48464371773440,
  "usage_percent": 46.73,
  "fragmentation": "13"
}

Whatever your source — SNMP, the API, or SSH + zpool — the point is that it’s a value you can log with a timestamp. A single reading is trivia; a series is a trend.

2. Model growth in percentage points per day

I deliberately keep the model stupid. Pool growth on a home NAS is dominated by a few big, slow consumers (media libraries, backups), so a linear fit over two points is plenty for a first estimate. I work in percentage points per day rather than raw bytes, because the thresholds I care about are percentages:

#!/usr/bin/env python3
import datetime

SIZE_TIB = 82.75
(date_a, pct_a) = datetime.date(2026, 8, 26), 50.5
(date_b, pct_b) = datetime.date(2026, 9, 18), 52.1

days = (date_b - date_a).days
pp_per_day = (pct_b - pct_a) / days            # percentage points/day
tib_per_day = pp_per_day / 100 * SIZE_TIB

for target in (80, 90):
    remaining_pp = target - pct_b
    days_left = remaining_pp / pp_per_day
    eta = date_b + datetime.timedelta(days=round(days_left))
    print(f"{target}%: {days_left:.0f} days out -> {eta}")

# 80%: 401 days out -> 2027-10-24
# 90%: 545 days out -> 2028-03-16
# pp/day: 0.0696  |  ~59 GiB/day

Two data points, 23 days apart, 1.6 percentage points of growth: about 0.07 pp/day, roughly 59 GiB/day. That put the 80% line around October 2027 — comfortable, but no longer abstract.

Now the honesty part. When I re-pulled the numbers for this post, the pool read 46.73% used — lower than the 52.1% from September. Some large datasets got pruned in between, and the trend line I’d built from August–September quietly went out of date. This is the single biggest caveat of a two-point linear extrapolation: it assumes yesterday’s behavior continues. Data gets deleted too. The fix isn’t a fancier model — it’s more data points. Log one reading a day and refit over a rolling window (30–60 days) instead of trusting the first two points forever. A two-point fit is a starting hypothesis, not a forecast you set your budget by.

3. Why the 80% line specifically

The 80% number isn’t superstition; it’s a tripwire with reasons behind it:

  • Fragmentation compounds. ZFS writes allocate in blocks and can’t always reclaim the gaps freed by deleted files. My pool sits at 13% fragmentation today — fine — but fragmentation climbs faster as free space shrinks, and a fragmented pool turns every write into a seek-fest on spinning rust.
  • Resilver headroom. When a disk in a raidz1 dies, the replacement resilver has to reconstruct every block somewhere with free space. A nearly full pool makes resilvers slower and more stressful — at the exact moment you can least afford it. Five-wide raidz1 with one parity disk means a failure during a rebuild is a second-failure-away from data loss. Don’t make the rebuild window longer than it has to be.
  • Performance cliff. ZFS switches allocator behavior as free space drops; copy speeds that were 200 MB/s at 50% can fall by an order of magnitude past 85–90%. The pool still works — it just gets old-man slow.
  • 80% leaves reaction time. At my measured (historical) growth of ~0.07 pp/day, the gap between 80% and 90% is about 5 TiB and eight months. If I cross 80% and do nothing, I still have a season to order drives or prune. That’s what a tripwire is for.

4. Watch scrubs, not just space

Capacity and health are two halves of the same check. The last scrub on this pool ran overnight — started 07:00 UTC on a Sunday, finished just over 19 hours later, processing ~42.5 TB with zero errors. That’s the data point I actually care about more than the usage percentage: scrub errors are how silent corruption stops being silent.

Two things worth automating around scrubs:

  • Check the last scrub’s outcome, not just whether one is running — a scrub that finished with errors weeks ago should still ring the bell.
  • Watch scrub duration over time. On my pool it processed about 2.2 TB/hour. When that number starts creeping up across months, it’s telling you something about the disks or the pool layout before anything actually fails.

And turn on autotrim if any part of your pool is SSD-backed — it’s free space hygiene you never have to think about again:

nas:~$ sudo zpool get autotrim tank
NAME  PROPERTY  VALUE  SOURCE
tank  autotrim  on     local

5. Make the check silent unless it isn’t

I run the capacity/health check from cron with a watchdog pattern: thresholds at 80% (warn) and 90% (crit), and no output at all when everything is normal. Cron emails me only when the script actually has something to say, which means an empty inbox is itself the “all clear” signal:

# thresholds, near the top of the script
DISK_PCT_WARN = 80
DISK_PCT_CRIT = 90

# ...collect pool/dataset percentages...

issues = [f"WARNING: {label} at {pct:.0f}%" for label, pct in disks if pct > DISK_PCT_WARN]
issues += [f"CRITICAL: {label} at {pct:.0f}%" for label, pct in disks if pct > DISK_PCT_CRIT]

if not issues:
    sys.exit(0)          # silent: healthy pools print nothing

print("**NAS capacity alert**")
for line in issues:
    print("-", line)

The crontab line is nothing special — daily, off-peak:

# m h  dom mon dow   command
15 4 * * * /usr/bin/python3 /opt/scripts/nas-health-check.py

One design rule I’ve stuck to: the alert script reports on every watched dataset, not just the pool root. “Pool is at 46%” hides a lot — a backup dataset can be at 95% while the pool average looks serene, and the backup dataset is the one that ruins your week when it fills.

6. Keep the monitoring path read-only

Every automated path that touches the NAS runs with a read-only credential. The monitoring cron can see pool status, dataset usage, and scrub state, and can do precisely nothing else. This sounds paranoid until the day a script has a bug and the blast radius is “it read some numbers” instead of “it destroyed a snapshot chain.” Reads for observability, writes only from a logged-in human who knows what they’re about to do.

Wrapping up

None of this is clever: one reading a day, a two-line growth model, an 80% tripwire, a quiet cron. The value isn’t in the math — it’s in converting “the pool will fill up someday” into a date you can see drifting as you add and delete data. And when the model says 2027 but the actual number dips because you finally deleted that 8 TiB of stuff you were keeping “temporarily,” you’ll have the history to see why.

Leave a Reply