## What is HAMMER? HAMMER is a file system written for DragonFly that provides instant crash recovery, multi-volume file systems, integrity checking, fine grained history/undo, networked mirroring, and historical snapshots. HAMMER is the default file system for DragonFly. ### General details * HAMMER file systems are immediately available after a crash. There is no fsck. * A single HAMMER file system can be up to 1 exabyte in size, and can encompass up to 256 volumes, each of which can be up to 4 petabytes (4096 terabytes). * HAMMER retains a fine-grained history. The state of the filesystem can be accessed live on 30-60 second boundaries without having to make explicit snapshots, up to a configurable fine-grained retention time. * Coarse-grained history is controlled by snapshots. By default the system cron generates one snapshot a day and retains 60 days worth. Snapshots can be accessed live. * A convenient undo command is provided for single-file history, diffs, and extractions. Snapshots may be used to access entire directory trees. * Data and meta-data is CRC-checked for integrity. ### Snapshots * Snapshots of the file system can be taken at any time, with no limitations. * Snapshots are indexed by the on-media B-Tree and are extremely storage-efficient. * Snapshots are "live", and can be accessed at any time. * Snapshot and historical data retention are controlled through a config file kept in meta-data - no manual maintenance is required for historical files. ### Backups and history * HAMMER file systems can be split up into multiple pseudo-file systems, or PFSs. Snapshots and backups can be different for each individual PFS. * HAMMER PFSs can be backed up continuously or in batch to other HAMMER PFSs, on a per-PFS basis. * Backup PFSs (slaves) are functionally identical to the original (master) and can be promoted to a master. * Slave PFSs can retain file history independent of the master volume's settings. * HAMMER can efficiently stream bandwidth-controlled near-real-time backup data to slave PFSs on remote hosts. * 1 master PFS can stream backups to any number of slave PFSs. * Slave-to-slave mirroring streams are supported, allowing mirrors to be chained together. For more details, please read the [hammer(5)](http://leaf.dragonflybsd.org/cgi/web-man?command=hammer§ion=5) man page. People interested in porting HAMMER to other operating systems should contact Matthew Dillon at dillon at backplane.com. ## Documentation [[!table data=""" Document|Description [hammer(5)](http://leaf.dragonflybsd.org/cgi/web-man?command=hammer§ion=5)|Hammer starter manual page [hammer(8)](http://leaf.dragonflybsd.org/cgi/web-man?command=hammer§ion=8)|Hammer utility manual page [undo(1)](http://leaf.dragonflybsd.org/cgi/web-man?command=undo§ion=1)|Hammer undo command [hammer.pdf](hammer.pdf)|Hammer major feature document [hammer](http://leaf.dragonflybsd.org/mailarchive/hammer/)|Hammer mailing list - see [[mailing list|mailinglists]] page [NYCBSDCon](/presentations/nycbsdcon08)|Slideshow from NYCBSDCon 11 Oct 2008 """]] ### General Administrative Notes * ***HAMMER is designed for use on storage media greater than 50G.*** Snapshots and history require significantly different space management than usual, and HAMMER will recover space based on each PFS's pruning schedule. * By default 60-days worth of snapshots are retained; adjust this based on disk size and activity. Free space will stabilize once the snapshot limit is reached. These parameters are programmable. For example, snapshots are typically turned off on /tmp, /var/tmp, /var/crash, and /usr/obj (each of which is a PFS in a typical DragonFly installation). * Various cleanup directives can be specified manually via [hammer(5)] for situations which do not fit default expectations. * The system cron automatically runs HAMMER cleanup functions at least once a day. More help topics involving HAMMER can be found in the [documentation section](/docs/documentation/) of this website.