Merge from vendor branch LIBARCHIVE:
[dragonfly.git] / sbin / mount_hammer / mount_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/mount_hammer/mount_hammer.8,v 1.6 2008/06/03 18:43:34 dillon Exp $
34 .Dd October 10, 2007
35 .Dt MOUNT_HAMMER 8
36 .Os
37 .Sh NAME
38 .Nm mount_hammer
39 .Nd mount a HAMMER file system
40 .Sh SYNOPSIS
41 .Nm
42 .Op Fl o Ar mount-options
43 .Op Fl T Ar time
44 .Ar special ...
45 .Ar mount-point
46 .Nm
47 .Op Fl u
48 .Op Fl o Ar mount-options
49 .Ar mount-point
50 .Sh DESCRIPTION
51 The
52 .Nm
53 utility mounts a HAMMER filesystem backed by one or more block devices.
54 .Pp
55 The options are as follows:
56 .Bl -tag -width indent
57 .It Fl o Ar mount-options
58 Specify mount options, which are a comma delimited set of options (see
59 .Xr mount 8 ) .
60 Supported mount options are:
61 .Bl -tag -width indent
62 .It Ar ro
63 Issue a read-only mount.
64 .El
65 .It Fl T Ar time
66 Mount the filesystem as-of a particular
67 .Ar time .
68 The mount will automatically be made read-only.
69 The
70 .Ar time
71 may be specified two ways.
72 A single integer followed by
73 .Sq s ,
74 .Sq m ,
75 .Sq h ,
76 .Sq D ,
77 .Sq M ,
78 or
79 .Sq Y
80 issues a historical mount as-of a number of seconds, minutes, hours, days,
81 months, or years ago.
82 A time specification of
83 .Pf yyyymmdd Oo :hhmmss Oc Ns Op .fractional
84 specifies an exact as-of timestamp in local (not UTC) time.
85 Set the TZ environment variable prior to running
86 .Nm
87 if you wish to specify the time by some other means.
88 .It Fl u
89 Update the mount point.  This is typically used to upgrade a mount to
90 read-write or downgrade it to read-only.
91 .El
92 .Sh NOTES
93 Note that issuing a read-only mount which requires UNDOs to be run will
94 still run the UNDOs, but will not flush the buffer cache buffers until/if
95 the mount is updated to read-write.
96 .Sh EXAMPLES
97 .Bd -literal -offset indent
98 mount_hammer -o ro,noatime /dev/ad0s1d /dev/ad1s1d /mnt
99 .Ed
100 .Pp
101 Mount a hammer filesystem made up of two volumes onto
102 .Pa /mnt .
103 .Sh DIAGNOSTICS
104 Exit status is 0 on success and 1 on error.
105 .Sh SEE ALSO
106 .Xr disklabel 8 ,
107 .Xr fdisk 8 ,
108 .Xr hammer 8 ,
109 .Xr newfs_hammer 8
110 .Sh HISTORY
111 The
112 .Nm
113 utility first appeared in
114 .Dx 1.11 .
115 .Sh AUTHORS
116 .An Matthew Dillon Aq dillon@backplane.com