New hammer utility feature in HEAD: 'hammer cleanup'
Matthew Dillon
dillon at apollo.backplane.com
Fri Sep 19 21:36:23 PDT 2008
I've added a meta-command to the hammer utility.
'hammer cleanup' will do the following:
* Locate all mounted HAMMER filesystems, including PFS's mounted with
nullfs.
* Create <fs>/snapshots and <fs>/snapshots/config if they do not exist.
* Snapshot, prune, and reblock the filesystems based on the config file.
This command will properly run hammer utility commands with cycle
files ( <fs>/snapshots/.*.cycle ) and time limits (default 5 minutes)
per sub-command.
The config file by default specifies that snapshots, pruning, and
reblocking should occur daily. That is, if you run this command
multiple times it will be a NOP most of the time, until the day turns
over, then it does its stuff.
The general idea is to use this command to take all the effort out of
building your own scripts to do these operations, simply running the
command without any arguments from cron.
--
This command does not yet remove any snapshots. I intend for it to
ultimately do that, and possibly even run a 'df' to figure out available
free space and start removing snapshots when free space gets low. It
does not do this yet, however, so you will have to manage removal of
the snapshots yourself.
-Matt
More information about the Kernel
mailing list