SSD storage usage for Proxmox Backup

Hello everyone,

I’ve noticed a strange phenomenon: when I run a “du -h | sort -h” command in HA, I get the following response:
319.6M ./usr
….
481.3M ./var
1.4G ./homeassistant
1.8G ./backup
4.0G .

Now, when I run a backup in Proxmox VM with the VM paused, this backup has reached 13.59GB in the meantime.
06/09: 6.69GB
13/09: 10.32GB
20/09: 12.96GB
The storage usage is increasing week by week.
The backup on 06/09 was carried out following a fresh installation for precisely this reason, with the data subsequently restored.
Where is this hard drive/SSD storage usage coming from and, more importantly, how can I reduce it again?

Home Assistant Supervisor is running!
System information:
OS Version: Home Assistant OS 18.3
Home Assistant Core: 2026.9.3


I checked on my end, and the size of my Proxmox backups also grows over time, though not as drastically as yours. From March until now, it has increased from about 5.5 GB to around 8 GB. I tried manual trim + backup and it went back to 5.3GB!

You can try (at your own risk! :wink: ).

  • in the Proxmox console, execute login
  • systemctl status fstrim.service
    If the result doesn’t look similar to this:
fstrim.service - Discard unused blocks on filesystems from /etc/fstab
     Loaded: loaded (/usr/lib/systemd/system/fstrim.service; static)
     Active: inactive (dead) since Sun 2026-09-27 11:47:06 UTC; 39s ago
TriggeredBy: ● fstrim.timer
       Docs: man:fstrim(8)
    Process: 231869 ExecStart=/usr/sbin/fstrim --listed-in /etc/fstab:/proc/self/mountinfo --verbose --quiet-unsupported
   Main PID: 231869 (code=exited, status=0/SUCCESS)
        CPU: 1.373s

Sep 27 11:45:41 homeassistant systemd[1]: Starting Discard unused blocks on filesystems from /etc/fstab...
Sep 27 11:47:06 homeassistant fstrim[231869]: /tmp: 9.1 MiB (9490432 bytes) trimmed on /dev/zram2
Sep 27 11:47:06 homeassistant fstrim[231869]: /mnt/data: 45.3 GiB (48607068160 bytes) trimmed on /dev/sda8
Sep 27 11:47:06 homeassistant fstrim[231869]: /mnt/overlay: 83.9 MiB (87992320 bytes) trimmed on /dev/sda7
Sep 27 11:47:06 homeassistant fstrim[231869]: /mnt/boot: 31.2 MiB (32696320 bytes) trimmed on /dev/sda1
Sep 27 11:47:06 homeassistant systemd[1]: fstrim.service: Deactivated successfully.
Sep 27 11:47:06 homeassistant systemd[1]: Finished Discard unused blocks on filesystems from /etc/fstab.
Sep 27 11:47:06 homeassistant systemd[1]: fstrim.service: Consumed 1.373s CPU time.

(which would mean that TRIM is working for you), execute:

  • systemctl start fstrim.service
    wait, and then systemctl status fstrim.service again, to see if it did the job

The command was supposed to run automatically every week, but apparently that wasn’t happening on my system.


Edit: there is more information on this topic. In short, fstrim runs overnight between Sunday and Monday; my backups (in STOP mode) take place at 2:30 AM on Sunday, which is six days after the scheduled trim. So, I need to check tomorrow whether the command actually ran and, perhaps, shift the backups by one day, immediately after the trim.

Where/how are you running this command? I would suspect the answer determines why you are seeing something unexpected. You have to run it outside of the HA docker container to be accurate.

Since you are running Proxmox, select the VM in the Proxmox UI, go to Console for the VM, at the ha > prompt enter “login” and run the du command at the # prompt. Is it different?

Yes, this is the resolution

2. Why the Proxmox backup grows every week

This is probably the main reason, and it has little to do with space usage within HA. When HAOS deletes a file – for example, yesterday’s HA backup (your /backup directory was modified at 00:01 today, so daily backups are running) – the blocks are only freed up for the file system. The virtual disk in Proxmox is unaware of this as long as no TRIM/Discard is passed through. New data is then written to blocks that are still unused, and vzdump backs up all blocks that have ever been written to. The image thus slowly fills up towards 32 GB, even though only 13 GB are actually in use.

Solution:
Proxmox → VM → Hardware → Hard Disk → Edit → Advanced: Enable Discard (it’s also advisable to enable ‘SSD emulation’).

Shut down the VM completely and restart it. A reboot from HA is not sufficient.

On the HAOS host (see below for access details), run a single trim command:

fstrim -av

Afterwards, the next Proxmox backup should be significantly smaller, roughly the size of the data actually in use.

3. Accessing the underlying HAOS
The easiest way is via the Proxmox console: Open the VM console in Proxmox. At the ha > prompt, type:
login

4. Analysis on the host
df -h /mnt/data
du -xh -d1 /mnt/data | sort -h
du -xh -d1 /mnt/data/docker | sort -h
docker system df
docker image ls
journalctl --disk-usage

5. Tidying up
Remove Docker images that are no longer in use (images of running or stopped add-ons will be retained):
docker image prune -a

Limit the journal:
journalctl --vacuum-size=200M

Afterwards, run fstrim -av again to ensure that the freed-up space is also recognised by Proxmox.

One more note: Your HA internal backups (1.8 GB in /backup) are included in every Proxmox backup. If you’re backing up via Proxmox anyway, it’s worth reducing the retention period for the HA backups or moving them to a network drive (Settings → System → Storage → Network Storage).

It is normal for fstrim.service not to run after a reboot. It is a one-off service: it starts, performs a single trim operation, and then stops. It is not intended to run continuously. It is triggered automatically via fstrim.timer.

You can check the timer on the HAOS host as follows:

systemctl status fstrim.timer
systemctl list-timers | grep fstrim

Unfortunately, running systemctl enable usually has no effect on HAOS. The root filesystem is read-only, and changes made to /etc/systemd/system generally do not survive a reboot or OS update.

The permanent solution: Trigger trim from within Proxmox

HAOS includes the QEMU Guest Agent. Proxmox can use this to trigger trim in the guest, regardless of HAOS updates.

Proxmox → VM → Options → Enable QEMU Guest Agent. Also tick the box for ‘Run guest-trim after a disk move or VM migration’.
Shut down the VM completely and restart it.
Test on the Proxmox host (replace 100 with your VM ID):
qm guest cmd 100 fstrim

The output shows the number of bytes trimmed per file system.
4. Set this up as a cron job on the Proxmox host using crontab -e:

0 2 * * 0 /usr/sbin/qm guest cmd 100 fstrim >/dev/null 2>&1

This runs every Sunday at 2.00 am. It’s best to schedule it just before your weekly Proxmox backup, so that the backup is always ‘lean’.

If you want to synchronise it very closely with the backup, you can also do this via a vzdump hook script in the ‘backup-start’ phase. However, the cron job is perfectly adequate for your weekly schedule.

Give this a read: Check HAOS Space utilization · GitHub
You forget the a flag for fstrim. I wrote bit about discard here too.