unifios-utilities
unifios-utilities copied to clipboard
AdguardHome filling up disk
Hey 👋
The Unifi Network application on my UDM-Pro was stuck "Starting".
$ sudo systemctl status unifi
● unifi.service - unifi
Loaded: loaded (/lib/systemd/system/unifi.service; enabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/unifi.service.d
└─ca-certificates-java.conf, limits.conf, service_override.conf, unifi-cgl-group.conf, unifi-mongodb.conf
Active: activating (start) since Tue 2024-03-26 15:48:54 CET; 1min 54s ago
Process: 45933 ExecStartPre=/usr/sbin/unifi-network-service-helper init (code=exited, status=0/SUCCESS)
Process: 45962 ExecStartPre=/usr/sbin/unifi-network-service-helper init-uos (code=exited, status=0/SUCCESS)
Main PID: 46091 (java)
Tasks: 39 (limit: 4724)
Memory: 330.6M (max: 1.2G swap max: 256.0M)
CPU: 44.980s
CGroup: /app.slice/app-unifi.slice/unifi.service
└─46091 /usr/bin/java -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Dapple.awt.UIElement=true -Dunifi.core.enabled=true -Dunifi.mongodb.service.enabled=true -XX:+UseParallelGC -Xms128M -Xm>
Mar 26 15:48:54 UDM-Pro-Bailly unifi-network-service-helper[45985]: <11>Mar 26 15:48:54 unifi: user: unifi, group: unifi
Mar 26 15:48:54 UDM-Pro-Bailly unifi[45986]: data: /data/unifi/data, logs: /data/unifi/logs, run: /data/unifi/run, additional storage: /srv/unifi
Mar 26 15:48:54 UDM-Pro-Bailly unifi-network-service-helper[45986]: <11>Mar 26 15:48:54 unifi: data: /data/unifi/data, logs: /data/unifi/logs, run: /data/unifi/run, additional storage: /srv/unifi
Mar 26 15:48:54 UDM-Pro-Bailly unifi[45987]: tmpfs: /var/opt/unifi/tmp, size: 64m
Mar 26 15:48:54 UDM-Pro-Bailly unifi-network-service-helper[45987]: <11>Mar 26 15:48:54 unifi: tmpfs: /var/opt/unifi/tmp, size: 64m
Mar 26 15:48:54 UDM-Pro-Bailly sudo[46007]: root : PWD=/usr/lib/unifi ; USER=unifi ; COMMAND=/usr/bin/test -w /data/unifi/data
Mar 26 15:48:54 UDM-Pro-Bailly sudo[46024]: root : PWD=/usr/lib/unifi ; USER=unifi ; COMMAND=/usr/bin/test -w /data/unifi/logs
Mar 26 15:48:54 UDM-Pro-Bailly sudo[46037]: root : PWD=/usr/lib/unifi ; USER=unifi ; COMMAND=/usr/bin/test -w /data/unifi/run
Mar 26 15:48:55 UDM-Pro-Bailly unifi[46089]: Skipping load-environment...
Mar 26 15:48:55 UDM-Pro-Bailly unifi-network-service-helper[46089]: <11>Mar 26 15:48:55 unifi: Skipping load-environment...
I found out that AdGuardHome was using 5G of disk space:
$ ll -h /data/custom/machines/debian-custom/opt/AdGuardHome/data/
drwxr-xr-x 2 root root 4.0K Mar 25 22:09 filters/
-rw-r--r-- 1 root root 2.5G Mar 26 15:57 querylog.json
-rw-r--r-- 1 root root 2.5G Jan 15 10:21 querylog.json.1
-rw-r--r-- 1 root root 32K Mar 15 10:58 sessions.db
-rw-r--r-- 1 root root 256K Mar 26 16:00 stats.db
Deleting one of these files solved my issue:
$ rm /data/custom/machines/debian-custom/opt/AdGuardHome/data/querylog.json.1
How can I make sure this won't happen again?
This is an adguard question, not an unifi question, isn't it. Head up to the Adguard forums to ask for retention.
@adrienbrault
In settings, General Settings, decrease the logs retention to 24h for example.