Merge branch 'vendor/EXPAT'
[dragonfly.git] / sbin / hammer / hammer.8
1 .\" Copyright (c) 2007 The DragonFly Project.  All rights reserved.
2 .\"
3 .\" This code is derived from software contributed to The DragonFly Project
4 .\" by Matthew Dillon <dillon@backplane.com>
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\"
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\"    notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\"    notice, this list of conditions and the following disclaimer in
14 .\"    the documentation and/or other materials provided with the
15 .\"    distribution.
16 .\" 3. Neither the name of The DragonFly Project nor the names of its
17 .\"    contributors may be used to endorse or promote products derived
18 .\"    from this software without specific, prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23 .\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
24 .\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25 .\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
26 .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
28 .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
30 .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 .\" SUCH DAMAGE.
32 .\"
33 .\" $DragonFly: src/sbin/hammer/hammer.8,v 1.58 2008/11/13 02:04:27 dillon Exp $
34 .\"
35 .Dd February 12, 2010
36 .Dt HAMMER 8
37 .Os
38 .Sh NAME
39 .Nm hammer
40 .Nd HAMMER file system utility
41 .Sh SYNOPSIS
42 .Nm
43 .Fl h
44 .Nm
45 .Op Fl 2BqrvXy
46 .Op Fl b Ar bandwidth
47 .Op Fl c Ar cyclefile
48 .Op Fl f Ar blkdevs
49 .\" .Op Fl s Ar linkpath
50 .Op Fl i Ar delay
51 .Op Fl p Ar ssh-port
52 .Op Fl t Ar seconds
53 .Op Fl C Ar cachesize Ns Op Ns Cm \&: Ns Ar readahead
54 .Op Fl S Ar splitsize
55 .Ar command
56 .Op Ar argument ...
57 .Sh DESCRIPTION
58 This manual page documents the
59 .Nm
60 utility which provides miscellaneous functions related to managing a
61 .Nm HAMMER
62 file system.
63 For a general introduction to the
64 .Nm HAMMER
65 file system, its features, and
66 examples on how to set up and maintain one, see
67 .Xr HAMMER 5 .
68 .Pp
69 The options are as follows:
70 .Bl -tag -width indent
71 .It Fl h
72 Get help.
73 .It Fl 2
74 Tell the mirror commands to use a 2-way protocol, which allows
75 automatic negotiation of transaction id ranges.
76 This option is automatically enabled by the
77 .Cm mirror-copy
78 command.
79 .It Fl b Ar bandwidth
80 Specify a bandwidth limit in bytes per second for mirroring streams.
81 This option is typically used to prevent batch mirroring operations from
82 loading down the machine.
83 The bandwidth may be suffixed with
84 .Cm k , m ,
85 or
86 .Cm g
87 to specify values in kilobytes, megabytes, and gigabytes per second.
88 If no suffix is specified, bytes per second is assumed.
89 .It Fl c Ar cyclefile
90 When pruning and reblocking you can instruction
91 .Nm
92 to start at the object id stored in the specified file.
93 If the file does not exist
94 .Nm
95 will start at the beginning.
96 If
97 .Nm
98 is told to run for a
99 specific period of time and is unable to complete the operation it will
100 write out the current object id so the next run can pick up where it left off.
101 If
102 .Nm
103 runs to completion it will delete
104 .Ar cyclefile .
105 .It Fl f Ar blkdevs
106 Specify the volumes making up a
107 .Nm HAMMER
108 file system.
109 .Ar Blkdevs
110 is a colon-separated list of devices, each specifying a
111 .Nm HAMMER
112 volume.
113 .It Fl i Ar delay
114 When maintaining a streaming mirroring this option specifies the
115 minimum delay after a batch ends before the next batch is allowed
116 to start.
117 The default is five seconds.
118 .It Fl p Ar ssh-port
119 This passes the -p <port> option to ssh when using a remote
120 specification for the source and/or destination.
121 .It Fl q
122 Decrease verboseness.
123 May be specified multiple times.
124 .It Fl r
125 Specify recursion for those commands which support it.
126 .It Fl t Ar seconds
127 When pruning and reblocking you can tell the utility to stop after a
128 certain period of time.
129 This option is used along with the
130 .Fl c Ar cyclefile
131 option to prune or reblock a portion of the file system incrementally.
132 .It Fl v
133 Increase verboseness.
134 May be specified multiple times.
135 .It Fl y
136 Force "yes" for any interactive question.
137 .It Fl B
138 Bulk Transfer.
139 .Cm Mirror-stream
140 will not attempt to break-up large initial bulk transfers into smaller
141 pieces.
142 This can save time but if the link is lost in the middle of the
143 initial bulk transfer you will have to start over from scratch.
144 This option is not recommended.
145 For more information see the
146 .Fl S
147 option.
148 .It Fl C Ar cachesize Ns Op Ns Cm \&: Ns Ar readahead
149 Set the memory cache size for any raw
150 .Tn I/O .
151 The default is 16m.
152 A suffix of
153 .Cm k
154 for kilobytes and
155 .Cm m
156 for megabytes is allowed,
157 else the cache size is specified in bytes.
158 .Pp
159 The read-behind/read-ahead defaults to 4
160 .Nm HAMMER
161 blocks.
162 .Pp
163 This option is typically only used with diagnostic commands
164 as kernel-supported commands will use the kernel's buffer cache.
165 .It Fl S Ar splitsize
166 Specify the bulk splitup size in bytes for mirroring streams.
167 When a mirror-stream is first started
168 .Nm
169 will do an initial run-through of the data to calculate good
170 transaction ids to cut up the bulk transfers, creating
171 restart points in case the stream is interrupted.
172 If we don't do this and the stream is interrupted it might
173 have to start all over again.
174 The default is a splitsize of 100m.
175 .Pp
176 At the moment the run-through is disk-bandwidth-heavy but some
177 future version will limit the run-through to just the B-Tree
178 records and not the record data.
179 .Pp
180 The splitsize may be suffixed with
181 .Cm k , m ,
182 or
183 .Cm g
184 to specify values in kilobytes, megabytes, or gigabytessecond.
185 If no suffix is specified, bytes is assumed.
186 .It Fl X
187 Enable compression for any remote ssh specifications.  Unfortunately
188 the
189 .Fl C
190 option has already been reserved for other purposes so we had to use
191 a different letter.  This option is typically used with the
192 mirroring directives.
193 .El
194 .Pp
195 The commands are as follows:
196 .Bl -tag -width indent
197 .\" ==== synctid ====
198 .It Cm synctid Ar filesystem Op Cm quick
199 Generates a guaranteed, formal 64 bit transaction id representing the
200 current state of the specified
201 .Nm HAMMER
202 file system.
203 The file system will be synced to the media.
204 .Pp
205 If the
206 .Cm quick
207 keyword is specified the file system will be soft-synced, meaning that a
208 crash might still undo the state of the file system as of the transaction
209 id returned but any new modifications will occur after the returned
210 transaction id as expected.
211 .Pp
212 This operation does not create a snapshot.
213 It is meant to be used
214 to track temporary fine-grained changes to a subset of files and
215 will only remain valid for
216 .Ql @@
217 snapshot access purposes for the
218 .Cm prune-min
219 period configured for the PFS.
220 If you desire a real snapshot then the
221 .Cm snapq
222 directive may be what you are looking for.
223 .\" ==== bstats ====
224 .It Cm bstats Op Ar interval
225 Output
226 .Nm HAMMER
227 B-tree statistics until interrupted.
228 Pause
229 .Ar interval
230 seconds between each display.
231 The default interval is one second.
232 .\" ==== iostats ====
233 .It Cm iostats Op Ar interval
234 Output
235 .Nm HAMMER
236 .Tn I/O
237 statistics until interrupted.
238 Pause
239 .Ar interval
240 seconds between each display.
241 The default interval is one second.
242 .\" ==== history ====
243 .It Cm history Ar path ...
244 Show the modification history for
245 .Nm HAMMER
246 file's inode and data.
247 .\" ==== blockmap ====
248 .It Cm blockmap
249 Dump the blockmap for the file system.
250 The
251 .Nm HAMMER
252 blockmap is two-layer
253 blockmap representing the maximum possible file system size of 1 Exabyte.
254 Needless to say the second layer is only present for blocks which exist.
255 .Nm HAMMER Ns 's
256 blockmap represents 8-Megabyte blocks, called big-blocks.
257 Each big-block has an append
258 point, a free byte count, and a typed zone id which allows content to be
259 reverse engineered to some degree.
260 .Pp
261 In
262 .Nm HAMMER
263 allocations essentially appended to a selected big-block using
264 the append offset and deducted from the free byte count.
265 When space is freed the free byte count is adjusted but
266 .Nm HAMMER
267 does not track holes in big-blocks for reallocation.
268 A big-block must be completely freed, either
269 through normal file system operations or through reblocking, before
270 it can be reused.
271 .Pp
272 Data blocks can be shared by deducting the space used from the free byte
273 count for each shared references, though
274 .Nm HAMMER
275 does not yet make use of this feature.
276 This means the free byte count can legally go negative.
277 .Pp
278 This command needs the
279 .Fl f
280 flag.
281 .\" ==== show ====
282 .It Cm show Op Ar lo Ns Cm \&: Ns Ar objid
283 Dump the B-tree.
284 By default this command will validate all B-Tree
285 linkages and CRCs, including data CRCs, and will report the most verbose
286 information it can dig up.
287 Any errors will show up with a
288 .Ql B
289 in column 1 along with various
290 other error flags.
291 .Pp
292 If you specify a localization and object id field,
293 .Ar lo Ns Cm \&: Ns Ar objid ,
294 the dump will
295 search for the key printing nodes as it recurses down, and then
296 will iterate forwards.
297 .Pp
298 If you use
299 .Fl q
300 the command will report less information about the inode contents.
301 .Pp
302 If you use
303 .Fl qq
304 the command will not report the content of the inode or other typed
305 data at all.
306 .Pp
307 If you use
308 .Fl qqq
309 the command will not report volume header information, big-block fill
310 ratios, mirror transaction ids, or report or check data CRCs.
311 B-tree CRCs and linkages are still checked.
312 .Pp
313 This command needs the
314 .Fl f
315 flag.
316 .\" ==== show-undo ====
317 .It Cm show-undo
318 .Nm ( HAMMER
319 VERSION 4+)
320 Dump the UNDO map.
321 .Pp
322 This command needs the
323 .Fl f
324 flag.
325 .\" .It Ar blockmap
326 .\" Dump the B-tree, record, large-data, and small-data blockmaps, showing
327 .\" physical block assignments and free space percentages.
328 .\" ==== namekey1 ====
329 .It Cm namekey1 Ar filename
330 Generate a
331 .Nm HAMMER
332 64 bit directory hash for the specified file name, using
333 the original directory hash algorithm in version 1 of the file system.
334 The low 32 bits are used as an iterator for hash collisions and will be
335 output as 0.
336 .\" ==== namekey2 ====
337 .It Cm namekey2 Ar filename
338 Generate a
339 .Nm HAMMER
340 64 bit directory hash for the specified file name, using
341 the new directory hash algorithm in version 2 of the file system.
342 The low 32 bits are still used as an iterator but will start out containing
343 part of the hash key.
344 .\" ==== namekey32 ====
345 .It Cm namekey32 Ar filename
346 Generate the top 32 bits of a
347 .Nm HAMMER
348 64 bit directory hash for the specified file name.
349 .\" ==== info ====
350 .It Cm info
351 Shows extended information about all the mounted
352 .Nm HAMMER
353 file systems.
354 The information is divided into sections:
355 .Bl -tag
356 .It Volume identification
357 General information, like the label of the
358 .Nm HAMMER
359 filesystem, the number of volumes it contains, the FSID, and the
360 .Nm HAMMER
361 version being used.
362 .It Big block information
363 Big block statistics, such as total, used, reserved and free big blocks.
364 .It Space information
365 Information about space used on the filesystem.
366 Currently total size, used, reserved and free space are displayed.
367 .It PFS Information
368 Basic information about the PFSs currently present on a
369 .Nm HAMMER
370 filesystem.
371 .Pp
372 .Dq PFS ID
373 is the ID of the PFS, with 0 being the root PFS.
374 .Dq Snaps
375 is the current snapshot count on the PFS.
376 .Dq Mounted on
377 displays the mount point of the PFS is currently mounted on (if any).
378 .El
379 .\" ==== cleanup ====
380 .It Cm cleanup Op Ar filesystem ...
381 This is a meta-command which executes snapshot, prune, rebalance and reblock
382 commands on the specified
383 .Nm HAMMER
384 file systems.
385 If no
386 .Ar filesystem
387 is specified this command will clean-up all
388 .Nm HAMMER
389 file systems in use, including PFS's.
390 To do this it will scan all
391 .Nm HAMMER
392 and
393 .Nm null
394 mounts, extract PFS id's, and clean-up each PFS found.
395 .Pp
396 This command will access a snapshots
397 directory and a configuration file for each
398 .Ar filesystem ,
399 creating them if necessary.
400 .Bl -tag -width indent
401 .It Nm HAMMER No version 2-
402 The configuration file is
403 .Pa config
404 in the snapshots directory which defaults to
405 .Pa <pfs>/snapshots .
406 .It Nm HAMMER No version 3+
407 The configuration file is saved in file system meta-data, see
408 .Nm
409 .Cm config .
410 The snapshots directory defaults to
411 .Pa /var/hammer/<pfs>
412 .Pa ( /var/hammer/root
413 for root mount).
414 .El
415 .Pp
416 The format of the configuration file is:
417 .Bd -literal -offset indent
418 snapshots  <period> <retention-time> [any]
419 prune      <period> <max-runtime>
420 rebalance  <period> <max-runtime>
421 reblock    <period> <max-runtime>
422 recopy     <period> <max-runtime>
423 .Ed
424 .Pp
425 Defaults are:
426 .Bd -literal -offset indent
427 snapshots  1d 60d  # 0d 0d  for PFS /tmp, /var/tmp, /usr/obj
428 prune      1d 5m
429 rebalance  1d 5m
430 reblock    1d 5m
431 recopy     30d 10m
432 .Ed
433 .Pp
434 Time is given with a suffix of
435 .Cm d ,
436 .Cm h ,
437 .Cm m
438 or
439 .Cm s
440 meaning day, hour, minute and second.
441 .Pp
442 If the
443 .Cm snapshots
444 directive has a period of 0 and a retention time of 0
445 then snapshot generation is disabled, removal of old snapshots are
446 disabled, and prunes will use
447 .Cm prune-everything .
448 If the
449 .Cm snapshots
450 directive has a period of 0 but a non-zero retention time
451 then this command will not create any new snapshots but will remove old
452 snapshots it finds based on the retention time.
453 .Pp
454 By default only snapshots in the form
455 .Ql snap- Ns Ar yyyymmdd Ns Op - Ns Ar HHMM
456 are processed.
457 If the
458 .Cm any
459 directive is specified as a third argument on the
460 .Cm snapshots
461 config line then any softlink of the form
462 .Ql *- Ns Ar yyyymmdd Ns Op - Ns Ar HHMM
463 or
464 .Ql *. Ns Ar yyyymmdd Ns Op - Ns Ar HHMM
465 will be processed.
466 .Pp
467 A prune max-runtime of 0 means unlimited.
468 .Pp
469 If period hasn't passed since the previous
470 .Cm cleanup
471 run nothing is done.
472 For example a day has passed when midnight is passed (localtime).
473 By default,
474 .Dx
475 is set up to run
476 .Nm Ar cleanup
477 nightly via
478 .Xr periodic 8 .
479 .Pp
480 The default configuration file will create a daily snapshot, do a daily
481 pruning, rebalancing and reblocking run and a monthly recopy run.
482 Reblocking is defragmentation with a level of 95%,
483 and recopy is full defragmentation.
484 .Pp
485 By default prune and rebalance operations are time limited to 5 minutes,
486 reblock operations to a bit over 5 minutes,
487 and recopy operations to a bit over 10 minutes.
488 Reblocking and recopy runs are each broken down into four separate functions:
489 btree, inodes, dirs and data.
490 Each function is time limited to the time given in the configuration file,
491 but the btree, inodes and dirs functions usually does not take very long time,
492 full defragmentation is always used for these three functions.
493 Also note that this directive will by default disable snapshots on
494 the following PFS's:
495 .Pa /tmp ,
496 .Pa /var/tmp
497 and
498 .Pa /usr/obj .
499 .Pp
500 The defaults may be adjusted by modifying the configuration file.
501 The pruning and reblocking commands automatically maintain a cyclefile
502 for incremental operation.
503 If you interrupt (^C) the program the cyclefile will be updated,
504 but a sub-command
505 may continue to run in the background for a few seconds until the
506 .Nm HAMMER
507 ioctl detects the interrupt.
508 The
509 .Cm snapshots
510 PFS option can be set to use another location for the snapshots directory.
511 .Pp
512 Work on this command is still in progress.
513 Expected additions:
514 An ability to remove snapshots dynamically as the
515 file system becomes full.
516 .\" ==== config ====
517 .It Cm config Op Ar filesystem Op Ar configfile
518 .Nm ( HAMMER
519 VERSION 3+)
520 If zero or one arguments are specified this function dumps the current
521 configuration file to stdout.
522 Zero arguments specifies the PFS containing the current directory.
523 This configuration file is stored in file system meta-data.
524 If two arguments are specified this function installs a new config file.
525 .Pp
526 In
527 .Nm HAMMER
528 versions less than 3 the configuration file is by default stored in
529 .Pa <pfs>/snapshots/config ,
530 but in all later versions the configuration file is stored in file system
531 meta-data.
532 .\" ==== viconfig ====
533 .It Cm viconfig Op Ar filesystem
534 .Nm ( HAMMER
535 VERSION 3+)
536 Edit the configuration file and reinstall into file system meta-data when done.
537 Zero arguments specifies the PFS containing the current directory.
538 .\" ==== volume-add ====
539 .It Cm volume-add Ar device Ar filesystem
540 This command will format
541 .Ar device
542 and add all of its space to
543 .Ar filesystem .
544 .Pp
545 .Em NOTE!
546 All existing data contained on
547 .Ar device
548 will be destroyed by this operation!
549 If
550 .Ar device
551 contains a valid
552 .Nm HAMMER
553 file system, formatting will be denied.
554 You can overcome this sanity check
555 by using
556 .Xr dd 1
557 to erase the beginning sectors of the device.
558 Also remember that you have to specify
559 .Ar device ,
560 together with any other device that make up the file system,
561 colon-separated to
562 .Pa /etc/fstab
563 and
564 .Xr mount_hammer 8 .
565 .\" ==== volume-del ====
566 .It Cm volume-del Ar device Ar filesystem
567 This command will remove volume
568 .Ar device
569 from
570 .Ar filesystem .
571 .Pp
572 Remember that you have to remove
573 .Ar device
574 from the colon-separated list in
575 .Pa /etc/fstab
576 and
577 .Xr mount_hammer 8 .
578 .\" ==== snapshot ====
579 .It Cm snapshot Oo Ar filesystem Oc Ar snapshot-dir
580 .It Cm snapshot Ar filesystem Ar snapshot-dir Op Ar note
581 Takes a snapshot of the file system either explicitly given by
582 .Ar filesystem
583 or implicitly derived from the
584 .Ar snapshot-dir
585 argument and creates a symlink in the directory provided by
586 .Ar snapshot-dir
587 pointing to the snapshot.
588 If
589 .Ar snapshot-dir
590 is not a directory, it is assumed to be a format string passed to
591 .Xr strftime 3
592 with the current time as parameter.
593 If
594 .Ar snapshot-dir
595 refers to an existing directory, a default format string of
596 .Ql snap-%Y%d%m-%H%M
597 is assumed and used as name for the newly created symlink.
598 .Pp
599 Snapshot is a per PFS operation, so a
600 .Nm HAMMER
601 file system and each PFS in it have to be snapshot separately.
602 .Pp
603 Example, assuming that
604 .Pa /mysnapshots
605 is on file system
606 .Pa /
607 and that
608 .Pa /obj
609 and
610 .Pa /usr
611 are file systems on their own, the following invocations:
612 .Bd -literal -offset indent
613 hammer snapshot /mysnapshots
614
615 hammer snapshot /mysnapshots/%Y-%m-%d
616
617 hammer snapshot /obj /mysnapshots/obj-%Y-%m-%d
618
619 hammer snapshot /usr /my/snaps/usr "note"
620 .Ed
621 .Pp
622 Would create symlinks similar to:
623 .Bd -literal -offset indent
624 /mysnapshots/snap-20080627-1210 -> /@@0x10d2cd05b7270d16
625
626 /mysnapshots/2008-06-27 -> /@@0x10d2cd05b7270d16
627
628 /mysnapshots/obj-2008-06-27 -> /obj@@0x10d2cd05b7270d16
629
630 /my/snaps/usr/snap-20080627-1210 -> /usr@@0x10d2cd05b7270d16
631 .Ed
632 .Pp
633 When run on a
634 .Nm HAMMER
635 version 3+ file system the snapshot is also recorded in file system meta-data
636 along with the optional
637 .Ar note .
638 See the
639 .Cm snapls
640 directive.
641 .\" ==== snap* ====
642 .It Cm snap Ar path Op Ar note
643 .Nm ( HAMMER
644 VERSION 3+)
645 Create a snapshot for the PFS containing
646 .Ar path
647 and create a snapshot softlink.
648 If the path specified is a
649 directory a standard snapshot softlink will be created in the directory.
650 The snapshot softlink points to the base of the mounted PFS.
651 .It Cm snaplo Ar path Op Ar note
652 .Nm ( HAMMER
653 VERSION 3+)
654 Create a snapshot for the PFS containing
655 .Ar path
656 and create a snapshot softlink.
657 If the path specified is a
658 directory a standard snapshot softlink will be created in the directory.
659 The snapshot softlink points into the directory it is contained in.
660 .It Cm snapq Ar dir Op Ar note
661 .Nm ( HAMMER
662 VERSION 3+)
663 Create a snapshot for the PFS containing the specified directory but do
664 not create a softlink.
665 Instead output a path which can be used to access
666 the directory via the snapshot.
667 .Pp
668 An absolute or relative path may be specified.
669 The path will be used as-is as a prefix in the path output to stdout.
670 As with the other
671 snap and snapshot directives the snapshot transaction id will be registered
672 in the file system meta-data.
673 .It Cm snaprm Ar path Ar ...
674 .It Cm snaprm Ar transid Ar ...
675 .It Cm snaprm Ar filesystem Ar transid Ar ...
676 .Nm ( HAMMER
677 VERSION 3+)
678 Remove a snapshot given its softlink or transaction id.
679 If specifying a transaction id
680 the snapshot is removed from file system meta-data but you are responsible
681 for removing any related softlinks.
682 .Pp
683 If a softlink path is specified the filesystem and transaction id
684 is derived from the contents of the softlink.
685 If just a transaction id is specified it is assumed to be a snapshot
686 in the HAMMER filesystem you are currently chdir'd into.
687 You can also specify the filesystem and transaction id explicitly.
688 .It Cm snapls Op Ar path ...
689 .Nm ( HAMMER
690 VERSION 3+)
691 Dump the snapshot meta-data for PFSs containing each
692 .Ar path
693 listing all available snapshots and their notes.
694 If no arguments are specified snapshots for the PFS containing the
695 current directory are listed.
696 This is the definitive list of snapshots for the file system.
697 .\" ==== prune ====
698 .It Cm prune Ar softlink-dir
699 Prune the file system based on previously created snapshot softlinks.
700 Pruning is the act of deleting file system history.
701 The
702 .Cm prune
703 command will delete file system history such that
704 the file system state is retained for the given snapshots,
705 and all history after the latest snapshot.
706 By setting the per PFS parameter
707 .Cm prune-min ,
708 history is guaranteed to be saved at least this time interval.
709 All other history is deleted.
710 .Pp
711 The target directory is expected to contain softlinks pointing to
712 snapshots of the file systems you wish to retain.
713 The directory is scanned non-recursively and the mount points and
714 transaction ids stored in the softlinks are extracted and sorted.
715 The file system is then explicitly pruned according to what is found.
716 Cleaning out portions of the file system is as simple as removing a
717 snapshot softlink and then running the
718 .Cm prune
719 command.
720 .Pp
721 As a safety measure pruning only occurs if one or more softlinks are found
722 containing the
723 .Ql @@
724 snapshot id extension.
725 Currently the scanned softlink directory must contain softlinks pointing
726 to a single
727 .Nm HAMMER
728 mount.
729 The softlinks may specify absolute or relative paths.
730 Softlinks must use 20-character
731 .Ql @@0x%016llx
732 transaction ids, as might be returned from
733 .Nm Cm synctid Ar filesystem .
734 .Pp
735 Pruning is a per PFS operation, so a
736 .Nm HAMMER
737 file system and each PFS in it have to be pruned separately.
738 .Pp
739 Note that pruning a file system may not immediately free-up space,
740 though typically some space will be freed if a large number of records are
741 pruned out.
742 The file system must be reblocked to completely recover all available space.
743 .Pp
744 Example, lets say your that you didn't set
745 .Cm prune-min ,
746 and snapshot directory contains the following links:
747 .Bd -literal -offset indent
748 lrwxr-xr-x  1 root  wheel  29 May 31 17:57 snap1 ->
749 /usr/obj/@@0x10d2cd05b7270d16
750
751 lrwxr-xr-x  1 root  wheel  29 May 31 17:58 snap2 ->
752 /usr/obj/@@0x10d2cd13f3fde98f
753
754 lrwxr-xr-x  1 root  wheel  29 May 31 17:59 snap3 ->
755 /usr/obj/@@0x10d2cd222adee364
756 .Ed
757 .Pp
758 If you were to run the
759 .Cm prune
760 command on this directory, then the
761 .Nm HAMMER
762 .Pa /usr/obj
763 mount will be pruned to retain the above three snapshots.
764 In addition, history for modifications made to the file system older than
765 the oldest snapshot will be destroyed and history for potentially fine-grained
766 modifications made to the file system more recently than the most recent
767 snapshot will be retained.
768 .Pp
769 If you then delete the
770 .Pa snap2
771 softlink and rerun the
772 .Cm prune
773 command,
774 history for modifications pertaining to that snapshot would be destroyed.
775 .Pp
776 In
777 .Nm HAMMER
778 file system versions 3+ this command also scans the snapshots stored
779 in the file system meta-data and includes them in the prune.
780 .\" ==== prune-everything ====
781 .It Cm prune-everything Ar filesystem
782 This command will remove all historical records from the file system.
783 This directive is not normally used on a production system.
784 .Pp
785 This command does not remove snapshot softlinks but will delete all
786 snapshots recorded in file system meta-data (for file system version 3+).
787 The user is responsible for deleting any softlinks.
788 .\" ==== rebalance ====
789 .It Cm rebalance Ar filesystem Op Ar saturation_percentage
790 This command will rebalance the B-tree, nodes with small number of
791 elements will be combined and element counts will be smoothed out
792 between nodes.
793 .Pp
794 The saturation percentage is between 50% and 100%.
795 The default is 75% (the
796 .Sq %
797 suffix is not needed).
798 .\" ==== reblock* ====
799 .It Cm reblock Ar filesystem Op Ar fill_percentage
800 .It Cm reblock-btree Ar filesystem Op Ar fill_percentage
801 .It Cm reblock-inodes Ar filesystem Op Ar fill_percentage
802 .It Cm reblock-dirs Ar filesystem Op Ar fill_percentage
803 .It Cm reblock-data Ar filesystem Op Ar fill_percentage
804 Attempt to defragment and free space for reuse by reblocking a live
805 .Nm HAMMER
806 file system.
807 Big-blocks cannot be reused by
808 .Nm HAMMER
809 until they are completely free.
810 This command also has the effect of reordering all elements, effectively
811 defragmenting the file system.
812 .Pp
813 The default fill percentage is 100% and will cause the file system to be
814 completely defragmented.
815 All specified element types will be reallocated and rewritten.
816 If you wish to quickly free up space instead try specifying
817 a smaller fill percentage, such as 90% or 80% (the
818 .Sq %
819 suffix is not needed).
820 .Pp
821 Since this command may rewrite the entire contents of the disk it is
822 best to do it incrementally from a
823 .Xr cron 8
824 job along with the
825 .Fl c Ar cyclefile
826 and
827 .Fl t Ar seconds
828 options to limit the run time.
829 The file system would thus be defragmented over long period of time.
830 .Pp
831 It is recommended that separate invocations be used for each data type.
832 B-tree nodes, inodes, and directories are typically the most important
833 elements needing defragmentation.
834 Data can be defragmented over a longer period of time.
835 .Pp
836 Reblocking is a per PFS operation, so a
837 .Nm HAMMER
838 file system and each PFS in it have to be reblocked separately.
839 .\" ==== pfs-status ====
840 .It Cm pfs-status Ar dirpath ...
841 Retrieve the mirroring configuration parameters for the specified
842 .Nm HAMMER
843 file systems or pseudo-filesystems (PFS's).
844 .\" ==== pfs-master ====
845 .It Cm pfs-master Ar dirpath Op Ar options
846 Create a pseudo-filesystem (PFS) inside a
847 .Nm HAMMER
848 file system.
849 Up to 65535 such file systems can be created.
850 Each PFS uses an independent inode numbering space making it suitable
851 for use as a replication source or target.
852 .Pp
853 The
854 .Cm pfs-master
855 directive creates a PFS that you can read, write, and use as a mirroring
856 source.
857 .Pp
858 It is recommended to use a
859 .Nm null
860 mount to access a PFS, for more information see
861 .Xr HAMMER 5 .
862 .\" ==== pfs-slave ====
863 .It Cm pfs-slave Ar dirpath Op Ar options
864 Create a pseudo-filesystem (PFS) inside a
865 .Nm HAMMER
866 file system.
867 Up to 65535 such file systems can be created.
868 Each PFS uses an independent inode numbering space making it suitable
869 for use as a replication source or target.
870 .Pp
871 The
872 .Cm pfs-slave
873 directive creates a PFS that you can use as a mirroring target.
874 You will not be able to access a slave PFS until you have completed the
875 first mirroring operation with it as the target (its root directory will
876 not exist until then).
877 .Pp
878 Access to the pfs-slave via the special softlink, as described in the
879 .Sx PFS NOTES
880 below, allows
881 .Nm HAMMER
882 to
883 dynamically modify the snapshot transaction id by returning a dynamic result
884 from
885 .Xr readlink 2
886 calls.
887 .Pp
888 A PFS can only be truly destroyed with the
889 .Cm pfs-destroy
890 directive.
891 Removing the softlink will not destroy the underlying PFS.
892 .Pp
893 It is recommended to use a
894 .Nm null
895 mount to access a PFS, for more information see
896 .Xr HAMMER 5 .
897 .\" ==== pfs-update ====
898 .It Cm pfs-update Ar dirpath Op Ar options
899 Update the configuration parameters for an existing
900 .Nm HAMMER
901 file system or pseudo-filesystem.
902 Options that may be specified:
903 .Bl -tag -width indent
904 .It Cm sync-beg-tid= Ns Ar 0x16llx
905 This is the automatic snapshot access starting transaction id for
906 mirroring slaves.
907 This parameter is normally updated automatically by the
908 .Cm mirror-write
909 directive.
910 .Pp
911 It is important to note that accessing a mirroring slave
912 with a transaction id greater than the last fully synchronized transaction
913 id can result in an unreliable snapshot since you will be accessing
914 data that is still undergoing synchronization.
915 .Pp
916 Manually modifying this field is dangerous and can result in a broken mirror.
917 .It Cm sync-end-tid= Ns Ar 0x16llx
918 This is the current synchronization point for mirroring slaves.
919 This parameter is normally updated automatically by the
920 .Cm mirror-write
921 directive.
922 .Pp
923 Manually modifying this field is dangerous and can result in a broken mirror.
924 .It Cm shared-uuid= Ns Ar uuid
925 Set the shared UUID for this file system.
926 All mirrors must have the same shared UUID.
927 For safety purposes the
928 .Cm mirror-write
929 directives will refuse to operate on a target with a different shared UUID.
930 .Pp
931 Changing the shared UUID on an existing, non-empty mirroring target,
932 including an empty but not completely pruned target,
933 can lead to corruption of the mirroring target.
934 .It Cm unique-uuid= Ns Ar uuid
935 Set the unique UUID for this file system.
936 This UUID should not be used anywhere else,
937 even on exact copies of the file system.
938 .It Cm label= Ns Ar string
939 Set a descriptive label for this file system.
940 .It Cm snapshots= Ns Ar string
941 Specify the snapshots directory which
942 .Nm
943 .Cm cleanup
944 will use to manage this PFS.
945 .Bl -tag -width indent
946 .It Nm HAMMER No version 2-
947 The snapshots directory does not need to be configured for
948 PFS masters and will default to
949 .Pa <pfs>/snapshots .
950 .Pp
951 PFS slaves are mirroring slaves so you cannot configure a snapshots
952 directory on the slave itself to be managed by the slave's machine.
953 In fact, the slave will likely have a
954 .Pa snapshots
955 sub-directory mirrored
956 from the master, but that directory contains the configuration the master
957 is using for its copy of the file system, not the configuration that we
958 want to use for our slave.
959 .Pp
960 It is recommended that
961 .Pa <fs>/var/slaves/<name>
962 be configured for a PFS slave, where
963 .Pa <fs>
964 is the base
965 .Nm HAMMER
966 file system, and
967 .Pa <name>
968 is an appropriate label.
969 .It Nm HAMMER No version 3+
970 The snapshots directory does not need to be configured for PFS masters or
971 slaves.
972 The snapshots directory defaults to
973 .Pa /var/hammer/<pfs>
974 .Pa ( /var/hammer/root
975 for root mount).
976 .El
977 .Pp
978 You can control snapshot retention on your slave independent of the master.
979 .It Cm snapshots-clear
980 Zero out the
981 .Cm snapshots
982 directory path for this PFS.
983 .It Cm prune-min= Ns Ar N Ns Cm d
984 .It Cm prune-min= Ns Oo Ar N Ns Cm d/ Oc Ns \
985 Ar hh Ns Op Cm \&: Ns Ar mm Ns Op Cm \&: Ns Ar ss
986 Set the minimum fine-grained data retention period.
987 .Nm HAMMER
988 always retains fine-grained history up to the most recent snapshot.
989 You can extend the retention period further by specifying a non-zero
990 pruning minimum.
991 Any snapshot softlinks within the retention period are ignored
992 for the purposes of pruning (the fine grained history is retained).
993 Number of days, hours, minutes and seconds are given as
994 .Ar N , hh , mm
995 and
996 .Ar ss .
997 .Pp
998 Because the transaction id in the snapshot softlink cannot be used
999 to calculate a timestamp,
1000 .Nm HAMMER
1001 uses the earlier of the
1002 .Fa st_ctime
1003 or
1004 .Fa st_mtime
1005 field of the softlink to
1006 determine which snapshots fall within the retention period.
1007 Users must be sure to retain one of these two fields when manipulating
1008 the softlink.
1009 .El
1010 .\" ==== pfs-upgrade ====
1011 .It Cm pfs-upgrade Ar dirpath
1012 Upgrade a PFS from slave to master operation.
1013 The PFS will be rolled back to the current end synchronization transaction id
1014 (removing any partial synchronizations), and will then become writable.
1015 .Pp
1016 .Em WARNING!
1017 .Nm HAMMER
1018 currently supports only single masters and using
1019 this command can easily result in file system corruption
1020 if you don't know what you are doing.
1021 .Pp
1022 This directive will refuse to run if any programs have open descriptors
1023 in the PFS, including programs chdir'd into the PFS.
1024 .\" ==== pfs-downgrade ====
1025 .It Cm pfs-downgrade Ar dirpath
1026 Downgrade a master PFS from master to slave operation
1027 The PFS becomes read-only and access will be locked to its
1028 .Cm sync-end-tid .
1029 .Pp
1030 This directive will refuse to run if any programs have open descriptors
1031 in the PFS, including programs chdir'd into the PFS.
1032 .\" ==== pfs-destroy ====
1033 .It Cm pfs-destroy Ar dirpath
1034 This permanently destroys a PFS.
1035 .Pp
1036 This directive will refuse to run if any programs have open descriptors
1037 in the PFS, including programs chdir'd into the PFS.
1038 .\" ==== mirror-read ====
1039 .It Cm mirror-read Ar filesystem Op Ar begin-tid
1040 Generate a mirroring stream to stdout.
1041 The stream ends when the transaction id space has been exhausted.
1042 .\" ==== mirror-read-stream ====
1043 .It Cm mirror-read-stream Ar filesystem Op Ar begin-tid
1044 Generate a mirroring stream to stdout.
1045 Upon completion the stream is paused until new data is synced to the
1046 master, then resumed.
1047 Operation continues until the pipe is broken.
1048 .\" ==== mirror-write ====
1049 .It Cm mirror-write Ar filesystem
1050 Take a mirroring stream on stdin.
1051 .Pp
1052 This command will fail if the
1053 .Cm shared-uuid
1054 configuration field for the two file systems do not match.
1055 .Pp
1056 If the target PFS does not exist this command will ask you whether
1057 you want to create a compatible PFS slave for the target or not.
1058 .\" ==== mirror-dump ====
1059 .It Cm mirror-dump
1060 A
1061 .Cm mirror-read
1062 can be piped into a
1063 .Cm mirror-dump
1064 to dump an ASCII representation of the mirroring stream.
1065 .\" ==== mirror-copy ====
1066 .\".It Cm mirror-copy Ar [[user@]host:]filesystem [[user@]host:]filesystem
1067 .It Cm mirror-copy \
1068 Oo Oo Ar user Ns Cm @ Oc Ns Ar host Ns Cm \&: Oc Ns Ar filesystem \
1069 Oo Oo Ar user Ns Cm @ Oc Ns Ar host Ns Cm \&: Oc Ns Ar filesystem
1070 This is a shortcut which pipes a
1071 .Cm mirror-read
1072 command to a
1073 .Cm mirror-write
1074 command.
1075 If a remote host specification is made the program forks a
1076 .Xr ssh 1
1077 and execs the
1078 .Cm mirror-read
1079 and/or
1080 .Cm mirror-write
1081 on the appropriate host.
1082 The source may be a master or slave PFS, and the target must be a slave PFS.
1083 .Pp
1084 This command also established full duplex communication and turns on
1085 the two-way protocol feature which automatically negotiates transaction id
1086 ranges without having to use a cyclefile.
1087 If the operation completes successfully the target PFS's
1088 .Cm sync-end-tid
1089 will be updated.
1090 Note that you must re-chdir into the target PFS to see the updated information.
1091 If you do not you will still be in the previous snapshot.
1092 .Pp
1093 If the target PFS does not exist this command will ask you whether
1094 you want to create a compatible PFS slave for the target or not.
1095 .\" ==== mirror-stream ====
1096 .\".It Cm mirror-stream Ar [[user@]host:]filesystem [[user@]host:]filesystem
1097 .It Cm mirror-stream \
1098 Oo Oo Ar user Ns Cm @ Oc Ns Ar host Ns Cm \&: Oc Ns Ar filesystem \
1099 Oo Oo Ar user Ns Cm @ Oc Ns Ar host Ns Cm \&: Oc Ns Ar filesystem
1100 This command works similarly to
1101 .Cm mirror-copy
1102 but does not exit after the initial mirroring completes.
1103 The mirroring operation will resume as changes continue to be made to the
1104 master.
1105 The command is commonly used with
1106 .Fl i Ar delay
1107 and
1108 .Fl b Ar bandwidth
1109 options to keep the mirroring target in sync with the source on a continuing
1110 basis.
1111 .Pp
1112 If the pipe is broken the command will automatically retry after sleeping
1113 for a short while.
1114 The time slept will be 15 seconds plus the time given in the
1115 .Fl i
1116 option.
1117 .Pp
1118 This command also detects the initial-mirroring case and spends some
1119 time scanning the B-Tree to find good break points, allowing the initial
1120 bulk mirroring operation to be broken down into about 20 separate pieces.
1121 This means that the user can kill and restart the operation and it will
1122 not have to start from scratch once it has gotten past the first chunk.
1123 The
1124 .Fl B
1125 option may be used to disable this feature and perform an initial bulk
1126 transfer instead.
1127 .\" ==== version ====
1128 .It Cm version Ar filesystem
1129 This command returns the
1130 .Nm HAMMER
1131 file system version for the specified
1132 .Ar filesystem
1133 as well as the range of versions supported in the kernel.
1134 The
1135 .Fl q
1136 option may be used to remove the summary at the end.
1137 .\" ==== version-upgrade ====
1138 .It Cm version-upgrade Ar filesystem Ar version Op Cm force
1139 This command upgrades the
1140 .Nm HAMMER
1141 .Ar filesystem
1142 to the specified
1143 .Ar version .
1144 Once upgraded a file system may not be downgraded.
1145 If you wish to upgrade a file system to a version greater or equal to the
1146 work-in-progress version number you must specify the
1147 .Cm force
1148 directive.
1149 Use of WIP versions should be relegated to testing and may require wiping
1150 the file system as development progresses, even though the WIP version might
1151 not change.
1152 .Pp
1153 .Em NOTE!
1154 This command operates on the entire
1155 .Nm HAMMER
1156 file system and is not a per PFS operation.
1157 All PFS's will be affected.
1158 .Bl -tag -width indent
1159 .It 1
1160 .Dx 2.0
1161 default version, first
1162 .Nm HAMMER
1163 release.
1164 .It 2
1165 .Dx 2.3 .
1166 New directory entry layout.
1167 This version is using a new directory hash key.
1168 .It 3
1169 .Dx 2.5 .
1170 New snapshot management, using file system meta-data for saving
1171 configuration file and snapshots (transaction ids etc.).
1172 Also default snapshots directory has changed.
1173 .It 4
1174 .Dx 2.5
1175 default version.
1176 New undo/flush, giving faster sync.
1177 .El
1178 .El
1179 .\".Sh EXAMPLES
1180 .Sh ENVIRONMENT
1181 If the following environment variables exist, they will be used by
1182 .Nm :
1183 .Bl
1184 .It Ev EDITOR
1185 The editor program specified in the variable
1186 .Ev EDITOR
1187 will be invoked instead of the default editor, which is
1188 .Xr vi 1
1189 .It Ev VISUAL
1190 Same effect as
1191 .Ev EDITOR
1192 variable.
1193 .El
1194 .Sh PSEUDO-FILESYSTEM (PFS) NOTES
1195 The root of a PFS is not hooked into the primary
1196 .Nm HAMMER
1197 file system as a directory.
1198 Instead,
1199 .Nm HAMMER
1200 creates a special softlink called
1201 .Ql @@PFS%05d
1202 (exactly 10 characters long) in the primary
1203 .Nm HAMMER
1204 file system.
1205 .Nm HAMMER
1206 then modifies the contents of the softlink as read by
1207 .Xr readlink 2 ,
1208 and thus what you see with an
1209 .Nm ls
1210 command or if you were to
1211 .Nm cd
1212 into the link.
1213 If the PFS is a master the link reflects the current state of the PFS.
1214 If the PFS is a slave the link reflects the last completed snapshot, and the
1215 contents of the link will change when the next snapshot is completed, and
1216 so forth.
1217 .Pp
1218 The
1219 .Nm
1220 utility employs numerous safeties to reduce user foot-shooting.
1221 The
1222 .Cm mirror-copy
1223 directive requires that the target be configured as a slave and that the
1224 .Cm shared-uuid
1225 field of the mirroring source and target match.
1226 .Sh UPGRADE INSTRUCTIONS HAMMER V1 TO V2
1227 This upgrade changes the way directory entries are stored.
1228 It is possible to upgrade a V1 file system to V2 in place, but
1229 directories created prior to the upgrade will continue to use
1230 the old layout.
1231 .Pp
1232 Note that the slave mirroring code in the target kernel had bugs in
1233 V1 which can create an incompatible root directory on the slave.
1234 Do not mix a
1235 .Nm HAMMER
1236 master created after the upgrade with a
1237 .Nm HAMMER
1238 slave created prior to the upgrade.
1239 .Pp
1240 Any directories created after upgrading will use a new layout.
1241 .Sh UPGRADE INSTRUCTIONS HAMMER V2 TO V3
1242 This upgrade adds meta-data elements to the B-Tree.
1243 It is possible to upgrade a V2 file system to V3 in place.
1244 After issuing the upgrade be sure to run a
1245 .Nm
1246 .Cm cleanup
1247 to perform post-upgrade tasks.
1248 .Pp
1249 After making this upgrade running a
1250 .Nm
1251 .Cm cleanup
1252 will move the
1253 .Pa <pfs>/snapshots
1254 directory for each PFS mount into
1255 .Pa /var/hammer/<pfs> .
1256 A
1257 .Nm HAMMER
1258 root mount will migrate
1259 .Pa /snapshots
1260 into
1261 .Pa /var/hammer/root .
1262 Migration occurs only once and only if you have not specified
1263 a snapshots directory in the PFS configuration.
1264 If you have specified a snapshots directory in the PFS configuration no
1265 automatic migration will occur.
1266 .Pp
1267 For slaves, if you desire, you can migrate your snapshots
1268 config to the new location manually and then clear the
1269 snapshot directory configuration in the slave PFS.
1270 The new snapshots hierarchy is designed to work with
1271 both master and slave PFSs equally well.
1272 .Pp
1273 In addition, the old config file will be moved to file system meta-data,
1274 editable via the new
1275 .Nm
1276 .Cm viconfig
1277 directive.
1278 The old config file will be deleted.
1279 Migration occurs only once.
1280 .Pp
1281 The V3 file system has new
1282 .Cm snap*
1283 directives for creating snapshots.
1284 All snapshot directives, including the original, will create
1285 meta-data entries for the snapshots and the pruning code will
1286 automatically incorporate these entries into its list and
1287 expire them the same way it expires softlinks.
1288 If you by accident blow away your snapshot softlinks you can use the
1289 .Cm snapls
1290 directive to get a definitive list from the file system meta-data and
1291 regenerate them from that list.
1292 .Pp
1293 .Em WARNING!
1294 If you are using
1295 .Nm
1296 to backup file systems your scripts may be using the
1297 .Cm synctid
1298 directive to generate transaction ids.
1299 This directive does not create a snapshot.
1300 You will have to modify your scripts to use the
1301 .Cm snapq
1302 directive to generate the linkbuf for the softlink you create, or
1303 use one of the other
1304 .Cm snap*
1305 directives.
1306 The older
1307 .Cm snapshot
1308 directive will continue to work as expected and in V3 it will also
1309 record the snapshot transaction id in file system meta-data.
1310 You may also want to make use of the new
1311 .Ar note
1312 tag for the meta-data.
1313 .Pp
1314 .Em WARNING!
1315 If you used to remove snapshot softlinks with
1316 .Nm rm
1317 you should probably start using the
1318 .Cm snaprm
1319 directive instead to also remove the related meta-data.
1320 The pruning code scans the meta-data so just removing the
1321 softlink is not sufficient.
1322 .Sh UPGRADE INSTRUCTIONS HAMMER V3 TO V4
1323 This upgrade changes undo/flush, giving faster sync.
1324 It is possible to upgrade a V3 file system to V4 in place.
1325 This upgrade reformats the UNDO FIFO (typically 1GB), so upgrade might take
1326 a minute or two depending.
1327 .Pp
1328 Version 4 allows the UNDO FIFO to be flushed without also having
1329 to flush the volume header, removing 2 of the 4 disk syncs typically
1330 required for an fsync() and removing 1 of the 2 disk syncs typically
1331 required for a flush sequence.
1332 .Sh EXIT STATUS
1333 .Ex -std
1334 .Sh FILES
1335 .Bl -tag -width ".It Pa <fs>/var/slaves/<name>" -compact
1336 .It Pa <pfs>/snapshots
1337 default per PFS snapshots directory
1338 .Nm ( HAMMER
1339 VERSION 2-)
1340 .It Pa /var/hammer/<pfs>
1341 default per PFS snapshots directory (not root)
1342 .Nm ( HAMMER
1343 VERSION 3+)
1344 .It Pa /var/hammer/root
1345 default snapshots directory for root directory
1346 .Nm ( HAMMER
1347 VERSION 3+)
1348 .It Pa <snapshots>/config
1349 per PFS
1350 .Nm
1351 .Cm cleanup
1352 configuration file
1353 .Nm ( HAMMER
1354 VERSION 2-)
1355 .It Pa <fs>/var/slaves/<name>
1356 recommended slave PFS snapshots directory
1357 .Nm ( HAMMER
1358 VERSION 2-)
1359 .El
1360 .Sh SEE ALSO
1361 .Xr ssh 1 ,
1362 .Xr undo 1 ,
1363 .Xr HAMMER 5 ,
1364 .Xr periodic.conf 5 ,
1365 .Xr mount_hammer 8 ,
1366 .Xr mount_null 8 ,
1367 .Xr newfs_hammer 8
1368 .Sh HISTORY
1369 The
1370 .Nm
1371 utility first appeared in
1372 .Dx 1.11 .
1373 .Sh AUTHORS
1374 .An Matthew Dillon Aq dillon@backplane.com