FreeNAS 8.0.1-BETA4: collectd stats daemon filling /var with zfs snapshots statistics

Status
Not open for further replies.

Wasurerarenai

Dabbler
Joined
Jun 28, 2011
Messages
15
The system statistics daemon 'collectd' is constantly running in the background generating the .rrd files in /var/db/collectd/rrd/localhost/*. The files in /var/db/collectd/rrd/localhost/df/* tend to get large as the daemon is gathering stats for every filesystem mounted including each and every zfs snapsot. When using the autosnap-based Storage/Periodic Snapshot Tasks feature in the webgui, you can generate a couple hundred snapshots easily when using options such as recursive or hourly snapshots or long retentions spans.

There should be a way to either disable the 'collectd' system statistics daemon (ex. adding 'collectd_enable="NO"' to /etc/rc.conf and making ix-collectd honor the setting). This might even be a simple "Disable System Statistics Service" checkbox with a warning that this will/could affect the FreeNAS webgui "Reporting" graphing page.

Or maybe there is an option for stopping collectd from generating the /var/db/collectd/rrd/localhost/df/* stats for zfs snashots. Another option might be disabling/read-only protecting the /var/db/collectd/rrd/localhost/df directory to prevent filesystem usage statistics from being generated. These currently don't seem to used in the "Reporting" graph page.

Thanks,
Mike
 

Wasurerarenai

Dabbler
Joined
Jun 28, 2011
Messages
15
Stop collectd from filling /var with filsystem statistics

Looked into ix-collectd script more. If you want the collectd to continue collecting the rest of the statistics but not the filesystem stats, then commenting out the following lines in the config file can help.

Code:
freenas# mount -uw /
freenas# ee /conf/base/etc/rc.d/ix-collectd
#LoadPlugin df

#<Plugin "df">
#    Mountpoint "/"
#    Mountpoint "/dev"
#    Mountpoint "/etc"
#    Mountpoint "/var"
#    Mountpoint "/mnt"
#    Mountpoint "/data"
#    Mountpoint "/var/tmp/.cache"
#    IgnoreSelected true
#</Plugin>

freenas# mount -ur /


If your currently having "/var filesystem full" errors try editing the config file the ix-collectd script generates, deleting the df plugin stats files, and restarting the service.
Code:
freenas# ee /usr/local/etc/collectd.conf
#LoadPlugin df

#<Plugin "df">
#    Mountpoint "/"
#    Mountpoint "/dev"
#    Mountpoint "/etc"
#    Mountpoint "/var"
#    Mountpoint "/mnt"
#    Mountpoint "/data"
#    Mountpoint "/var/tmp/.cache"
#    IgnoreSelected true
#</Plugin>

freenas# service collectd stop
freenas# rm -f /var/db/collectd/rrd/localhost/df/*
freenas# service collectd start
 
Status
Not open for further replies.
Top