Skip to content
Contents
GuidesOpenWrt

collectd fails after saving settings because /var/lib/collectd does not exist

After saving the statistics settings, verify which configuration is being loaded on startup, then check whether the data directory required by that configuration is ready.

Applies to · OpenWrt SNAPSHOT · realtek/rtl930x · collectd · alt_config_file

What to check

From the generated configuration, verify the actual BaseDir and running account; check whether the directory was not created, has incorrect permissions, or resides on a medium mounted only after boot.

Connect over Ethernet and run the following commands in an SSH session on the router.

ls -ld /var/lib/collectd
logread -e collectd
ps w | grep '[c]ollectd'

How to interpret the result

If the log says /var/lib/collectd is missing, check when the filesystem mounts and which startup step creates the directory. If the directory exists but writes fail, compare its owner and permissions with the account running collectd. Keep the existing statistics database.

Verify and recover

Verify that collectd can use the target directory both after startup and after applying its configuration. Preserve existing data and restore the previous mount order if required.

Related guide · Choose serial logs or TFTP when an OpenWrt router cannot boot

Explore hardware

Comments