Update HAMMER2 design docs
[ikiwiki.git] / hammer / index.mdwn
1 ## What is HAMMER?
2
3 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.
4
5 ### General details
6 * HAMMER file systems are immediately available after a crash.  There is no fsck.
7 * 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).
8 * 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.
9 * 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.
10 * A convenient undo command is provided for single-file history, diffs, and extractions.  Snapshots may be used to access entire directory trees.
11 * Data and meta-data is CRC-checked for integrity.
12 * Data block deduplication
13
14 ### Snapshots
15 * Snapshots of the file system can be taken at any time, with no limitations.
16 * Snapshots are indexed by the on-media B-Tree and are extremely storage-efficient.
17 * Snapshots are "live", and can be accessed at any time.
18 * Snapshot and historical data retention are controlled through a config file kept in meta-data - no manual maintenance is required for historical files.
19
20 ### Backups and history
21 * HAMMER file systems can be split up into multiple pseudo-file systems, or PFSs.  Snapshots and backups can be different for each individual PFS.
22 * HAMMER PFSs can be backed up continuously or in batch to other HAMMER PFSs, on a per-PFS basis.  
23 * Backup PFSs (slaves) are functionally identical to the original (master) and can be promoted to a master.
24 * Slave PFSs can retain file history independent of the master volume's settings.
25 * HAMMER can efficiently stream bandwidth-controlled near-real-time backup data to slave PFSs on remote hosts.
26 * 1 master PFS can stream backups to any number of slave PFSs.
27 * Slave-to-slave mirroring streams are supported, allowing mirrors to be chained together. 
28  
29 For more details, please read the [hammer(5)](http://leaf.dragonflybsd.org/cgi/web-man?command=hammer&section=5) man page.  People interested in porting HAMMER to other operating systems should contact Matthew Dillon at dillon at backplane.com.
30
31
32 ## Documentation
33
34 [[!table  data="""
35 Document|Description
36 [hammer(5)](http://leaf.dragonflybsd.org/cgi/web-man?command=hammer&section=5)|Hammer starter manual page
37 [hammer(8)](http://leaf.dragonflybsd.org/cgi/web-man?command=hammer&section=8)|Hammer utility manual page
38 [undo(1)](http://leaf.dragonflybsd.org/cgi/web-man?command=undo&section=1)|Hammer undo command
39 [hammer.pdf](hammer.pdf)|Hammer major feature document
40 [hammer](http://leaf.dragonflybsd.org/mailarchive/hammer/)|Hammer mailing list - see [[mailing list|mailinglists]] page
41 [NYCBSDCon](/presentations/nycbsdcon08)|Slideshow from NYCBSDCon 11 Oct 2008
42
43 """]]
44
45 ### General Administrative Notes
46 * ***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.
47 * 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).
48 * Various cleanup directives can be specified manually via [hammer(5)](http://leaf.dragonflybsd.org/cgi/web-man?command=hammer&section=5) for situations which do not fit default expectations.
49 * The system cron automatically runs HAMMER cleanup functions at least once a day.
50
51 More help topics involving HAMMER can be found in the [documentation section](/docs/documentation/) of this website.
52
53
54 ## HAMMER2
55
56 HAMMER2, the successor of HAMMER, is under active development since 2012. For more information, you can consult the following resources:
57
58 * [HAMMER2 Design v1 (08-Feb-2012)](https://gitweb.dragonflybsd.org/dragonfly.git/blob/05af5bd1aeaf8bf30d36fc65103097415b943700:/sys/vfs/hammer2/DESIGN), [Mailing list](http://leaf.dragonflybsd.org/mailarchive/users/2012-02/msg00020.html)
59 * [HAMMER2 Design v2 (14-May-2013)](https://gitweb.dragonflybsd.org/dragonfly.git/blob/1a7cfe5ae3c897f704a358fd3e556a55e430dcb1:/sys/vfs/hammer2/DESIGN)
60 * [HAMMER2 Design v3 (03-Apr-2015)](https://gitweb.dragonflybsd.org/dragonfly.git/blob/b93cc2e0815ec1ad6d6f8e60cc0becbdee247679:/sys/vfs/hammer2/DESIGN)
61 * [HAMMER2 Design v4 (09-Jul-2016)](https://gitweb.dragonflybsd.org/dragonfly.git/blob/7fece146f268d677c46bde997079860f4cf553d0:/sys/vfs/hammer2/DESIGN)
62 * [HAMMER2 Design v5 (24-Jul-2017)](https://gitweb.dragonflybsd.org/dragonfly.git/blob/b7910865ff18fc68fa4af19f7c7ad1b021a346be:/sys/vfs/hammer2/DESIGN)