HAMMER cleanup / periodic(8)
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
http://leaf.dragonflybsd.org/mailarchive/kernel/2008-10/index.html#00051
I suggest that we by default run periodic(8) at reboot, delayed by 30 minut=
es.
(periodic(8) run in background, like present default)
This will by default run 'hammer cleanup' (by periodic/daily/160.clean-hamm=
er),
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 u=
ser,
and periodic(8) daily shall not run multiple times a day, this has to be ha=
ndled.
Doing this for a year, just using anacron(8), including periodic(8) in anac=
rontab,
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 DragonFl=
y base
anyway (GPL licensed), but it is quite simple functionality, that we can wr=
ite
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.
-thomas
討論串 (同標題文章)