New hammer utility feature in HEAD: 'hammer cleanup'

Johannes Hofmann johannes.hofmann at
Sat Sep 27 13:04:40 PDT 2008

Matthew Dillon <dillon at> wrote:
>    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.

When run on a filesystem without snapshots, cleanup seems to create a
single snapshot and start pruning.

More information about the Kernel mailing list