HAMMER cleanup / periodic(8)

Thomas Nikolajsen thomas.nikolajsen at mail.dk
Sun Nov 22 06:05:27 PST 2009

We need by default to run 'hammer cleanup' every day system is running;
also on systems not running at night.

Otherwise snapshots won't be generated and HAMMER file system fills up.
This will result in users not having the benefits from HAMMER they could.

Our present default setup is to run 'hammer cleanup' daily by periodic(8),
which runs by default every night at 3 AM (via /etc/crontab).
This is nice for systems running every night, typically servers.
But it doesn't help newbies running systems not running every night.

A year ago we had a good discussion on this topic;
many good ideas and viewpoint were presented, see

I suggest that we by default run periodic(8) at reboot, delayed by 30 minutes.
(periodic(8) run in background, like present default)

This will by default run 'hammer cleanup' (by periodic/daily/160.clean-hammer),
and also the other nice functionalities in the periodic(8) scripts,
that systems not running at night in our present default setup won't run at all.
Defaults, running periodic(8) at all and delay period, can be adjusted by user,
and periodic(8) daily shall not run multiple times a day, this has to be handled.

Doing this for a year, just using anacron(8), including periodic(8) in anacrontab,
using a delay of a few minutes, I haven't seen any problems.
(This is close to fulfill above requirements(*), good enough for my test)
Anacron(8) doesn't fulfill requirements fully and can't be used in DragonFly base
anyway (GPL licensed), but it is quite simple functionality, that we can write
ourselves, I could do it if we like it.

* periodic(8) can be run more than once a day: if system is running at 3 AM and
is rebooted later the same day periodic(8) will run twice; this is rare in my use.


More information about the Kernel mailing list