How to free up space in my application pool?

Hello, everyone. Recently, I’ve been seeing the following message in my Alerts: "Space usage for pool ‘apps’ is 78%. Optimal pool performance requires used space to remain below 80%.“Optimal pool performance requires used space to remain below 80%.”.
I looked at the pool space and see what is taking up space.

sudo du -h --max-depth=1 /mnt/apps/ix-applications/k3s/agent/containerd
[sudo] password for admin:
1.0K /mnt/apps/ix-applications/k3s/agent/containerd/io.containerd.snapshotter.v1.fuse-overlayfs
14M /mnt/apps/ix-applications/k3s/agent/containerd/io.containerd.grpc.v1.cri
32G /mnt/apps/ix-applications/k3s/agent/containerd/io.containerd.content.v1.content
512 /mnt/apps/ix-applications/k3s/agent/containerd/io.containerd.runtime.v1.linux
512 /mnt/apps/ix-applications/k3s/agent/containerd/io.containerd.snapshotter.v1.btrfs
6.5K /mnt/apps/ix-applications/k3s/agent/containerd/io.containerd.snapshotter.v1.stargz
1.0K /mnt/apps/ix-applications/k3s/agent/containerd/io.containerd.snapshotter.v1.native
54G /mnt/apps/ix-applications/k3s/agent/containerd/io.containerd.snapshotter.v1.overlayfs
2.8M /mnt/apps/ix-applications/k3s/agent/containerd/io.containerd.metadata.v1.bolt
512 /mnt/apps/ix-applications/k3s/agent/containerd/lib
228K /mnt/apps/ix-applications/k3s/agent/containerd/io.containerd.runtime.v2.task
512 /mnt/apps/ix-applications/k3s/agent/containerd/tmpmounts
512 /mnt/apps/ix-applications/k3s/agent/containerd/bin
85G /mnt/apps/ix-applications/k3s/agent/containerd

Is there any way to free up space?

use the datasets page in the webui, find what’s using the space. you also don’t say how big the pool itself is, or if it has any other datasets besides ix-applications (and their descendants)

du will not show space that is used by old snapshots, however the datasets page in the ui shows space consumed by live data and previous snapshots. and there is a seperate webui page for snapshots that you should also pay a visit. \

also that error is an incredibly generic one that happens on any pool. IMO you can safely dismiss/ignore it and fill beyond if any of these apply:

  • you are using SSDs as fragmentation really doesn’t matter.
  • you are using HDDs and the data isn’t being constantly re-written. (media files, etc)
  • you are ok with a potential loss of performance on newly allocated data being slightly fragmented.

Hello.
The pool itself is small at 120G. It contains only ix-applications and configuration files.
In webui, in the Dataset tab, 86G is occupied by ix-applications.

Summary

sudo du -h --max-depth=1 /mnt/apps/ix-applications
512 /mnt/apps/ix-applications/default_volumes
47M /mnt/apps/ix-applications/backups
1.1G /mnt/apps/ix-applications/catalogs
86G /mnt/apps/ix-applications/k3s
443M /mnt/apps/ix-applications/releases
88G /mnt/apps/ix-applications

If you don’t have a lot of snapshots with stale data retained, then perhaps consider growing the size of your pool.

I am also having this issue, I have a pool of 500GB, and the only thing it has on it is ix-applications but it’s filled up to 84% now, and one of the largest sets of files is this ix-applications/k3s/agent/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots directory.
I have deleted all the old docker images, using the GUI, and run docker system prune, etc. but still thils snapshots directory is still holding onto lots of data.
I was on 90% disk usage, but managed to get space back deleting the old files from the GUI image management interface, but how can I clear out this directory?

To help anyone else who ends up in my situation, I figured out that this ix-applications dataset is actually not needed any more.
Sometime last year, Truenas Scale migrated its apps system from Kubernetees, to docker. At that point, they stopped using the ix-applications dataset.

In summary, TrueNAS ix-apps is the new default dataset name used for storing application data, starting from version 24.10. ix-Applications is the legacy dataset name used in earlier versions of TrueNAS. For backwards compatibility, when a system is upgraded from an earlier release to 24.10.

The issue is that the new ix-apps dataset is hidden in the UI, so you don’t even know you have two datasets for apps.

I then went to delete the deprecated dataset, as I have no plan to downgrade to the old version of TrueNAS, but the dataset was “in use”, so could not unmount.

I first tried stopping all apps, but that did nothing.
Eventually I found that there was some tmux session on another user that had the directory open, I found that by doing lsof | grep ix-applications and finding the PIDs, and killing them.
Then I could delete the dataset, freeing up hundreds of Gigabytes of space, now I am back down to 40% utilisation, yay!