HAMMER cleanup

Sascha Wildner saw at online.de
Tue Oct 21 13:46:47 PDT 2008


Thomas Nikolajsen schrieb:
When / how do we prefer to run HAMMER cleanup?

My thoughts:

It is important to cleanup HAMMER file systems regularly,
to get snapshots generated and prune & reblock so
file system doesn't get too fragment or fill up.
This should be done by default; this way users will
only get minimal extra administration tasks by using HAMMER.
Default action: `hammer cleanup';
with ability to specify other command.
command should, just like `hammer snapshot',
snapshot, prune & reblock all HAMMER file systems, including PFS.
 - periodic/daily
Executes in the night (starts 3:01 AM).
Cleanup by default; ability to disable (periodic.conf).
Fine for servers running 24h a day; not good for systems turned off at night.
Maybe periodic/monthly should also be used, so extended cleanup won't give disk trashing.
 - rc.d/hammer_cleanup
Executes at boot time.
Cleanup by default; ability to disable (rc.conf).
Fine for systems turned off at night.
I see no problem by enabling cleanup in both rc.d and periodic by default,
as `hammer cleanup' is a no op. if executed more than once a day.
If users want snapshot more often (eg. every hour), a cron script can do that,
this is very light weight to generate; normally it will normally be enough to
prune & reblock file system once a day.
I can make scripts for this, when we agree on what we want.
I fully agree and had talked to Matt about this in IRC.

See the patch for periodic at 
http://leaf.dragonflybsd.org/~swildner/hammer_periodic.diff. If no one 
objects, I'll commit within the next few days.

About the rc script: I'm not sure because for a machine which was turned 
off for a longer time this (if enabled by default) would make booting 
take a rather long time.

Sascha

--
http://yoyodyne.ath.cx




More information about the Kernel mailing list