1 .\" Copyright (c) 2003,2004 The DragonFly Project. All rights reserved.
3 .\" This code is derived from software contributed to The DragonFly Project
4 .\" by Matthew Dillon <dillon@backplane.com>
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\" notice, this list of conditions and the following disclaimer.
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\" notice, this list of conditions and the following disclaimer in
15 .\" the documentation and/or other materials provided with the
17 .\" 3. Neither the name of The DragonFly Project nor the names of its
18 .\" contributors may be used to endorse or promote products derived
19 .\" from this software without specific, prior written permission.
21 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24 .\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25 .\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26 .\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
27 .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
29 .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30 .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
31 .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 .\" $DragonFly: src/sbin/mountctl/mountctl.8,v 1.15 2008/10/16 23:08:30 swildner Exp $
36 .Dd September 28, 2009
41 .Nd control journaling and other features on mounted file systems
45 .Brq Ar mountpt | tag | mountpt Ns : Ns Ar tag
49 .Op Fl w/W Ar output_path
50 .Op Fl x/X Ar filedesc
52 .Ar mountpt Ns Cm \&: Ns Ar tag
56 .Op Fl w/W Ar output_path
57 .Op Fl x/X Ar filedesc
58 .Ar mountpt Ns Cm \&: Ns Ar tag
61 .Brq Ar mountpt | tag | mountpt Ns Cm \&: Ns Ar tag
65 .Brq Ar mountpt | tag | mountpt Ns Cm \&: Ns Ar tag
68 .Brq Ar mountpt | tag | mountpt Ns Cm \&: Ns Ar tag
72 utility manages journaling and (eventually) other features on a mounted
74 Note that a mount point path must begin with
76 and tag names must not
82 will list all installed journals in the system or on a particular mount point
83 or tag, including their current state of operation.
87 will add a new journal to a mount point.
88 A mount may have any number of journals associated with it.
89 If no output path is specified the journal
90 will be written to the standard output.
91 Options may be specified as described in the
94 The tag is required and must be unique
95 relative to any given mount, but you can use the same tag on multiple
96 mount points if you wish (and control them all together by referencing that
98 The output path may represent any streamable entity.
100 output to a pipe into a program which does further buffering or processing
103 A stalled journaling descriptor will stall the filesystem.
105 kernel-implemented swap backing will be available for journals but that is
106 not the case at the moment.
110 will restart an existing journal, directing it to a new file descriptor.
111 A shutdown is sent to the old journal and the system waits for the return
112 direction (if running full-duplex) to EOF.
113 The new descriptor is then
114 installed and the FIFO index is reset to the last acknowledged transaction.
115 Clients scanning a journal across such a disconnect must check for repeated
116 transaction ids since some overlap between the old and new journal may occur.
120 will remove the specified journal(s).
121 A mount point, a tag, or both may be specified.
122 This function will operate on all matching journals.
126 will modify the options associated with an existing journal.
127 Options are specified in the
131 .Bl -tag -width indent
133 Specify full-duplex operation.
134 The kernel will not throw away journal
135 data in its internal FIFO until the transaction id is acknowledged.
136 This requires a full-duplex journaling descriptor.
137 Note that shell pipes are full-duplex-capable.
139 Flush a journal, equivalent to the
145 Freeze a journal, equivalent to the
156 Start a stopped journal, equivalent to the
162 Close a journal, equivalent to the
168 Abort a journal, equivalent to the
173 .It Fl w Ar output_path
174 Change a journal's stream descriptor to the specified path.
182 The target file must not reside on the same filesystem being journaled.
183 .It Fl W Ar output_path
186 but overrides target safety checks.
188 Change a journal's stream descriptor to the specified file descriptor number.
196 The target file must not reside on the same filesystem being journaled.
200 but overrides target safety checks.
203 .Sx OPTION KEYWORDS .
206 Options keywords may be comma delimited without whitespace within a single
211 Some keywords require a value which is specified as
212 .Ar keyword Ns = Ns Ar value .
213 Any option may be prefixed with
217 to turn off the option.
218 Some options are one-shot and have no
224 The options are as follows:
225 .Bl -tag -width indent
227 Generate a reversable journaling stream.
228 This allows the target to run
229 the journal backwards as well as forwards to
234 Indicate that the journaling stream is a two-way stream and that transaction
235 id acknowledgements will be returned.
236 This option is the same as the
239 .It Cm memfifo= Ns Ar size Ns Op Cm k Ns , Ns Cm m
240 Specify the size of the in-kernel memory FIFO used to buffer the journaling
241 stream between processes doing filesystem operations and the worker thread
242 writing out the journal.
243 Since the kernel has limited virtual memory
244 buffers larger than 4MB are not recommended.
245 .It Cm swapfifo= Ns Ar size Ns Op Cm k Ns , Ns Cm m Ns , Ns Cm g
246 Specify the size of the kernel-managed swap-backed FIFO used to buffer
248 .It Cm path= Ns Ar filepath
249 Specify where the journal's output stream should be directed.
252 option is equivalent to specifying the path option.
253 Both should not be specified.
254 .It Cm fd= Ns Ar filedesc
255 Specify where the journal's output stream should be directed by handing over
257 Use file descriptor 1 if you wish to output the journal to the current stdout.
260 option is equivalent to specifying the path option.
261 Both should not be specified.
263 Freeze the worker thread.
264 This may cause the filesystem to stall once
265 the memory fifo has filled up.
266 A freeze point record will be written to the journal.
267 If used as part of the creation of a new journal via
269 this option will prevent any initial output to the journal and a freeze
270 point record will NOT be written.
271 Again, the filesystem will stall if the memory fifo fills up.
273 Start or restart the worker thread after a freeze.
276 Any transactions still under way will be allowed to
277 complete, a closing record will be generated, and the journaling descriptor
279 If the connection is two-way the journal will away a final
280 acknowledgement of the closing record before closing the descriptor.
283 Any currently buffered data will be aborted.
284 No close record is written.
285 The journaling stream is immediately closed.
288 All currently buffered data is flushed.
290 does not return until the write succeeds and, if the connection is two-way,
291 and acknowledgement has been returned for journaled data buffered at the
292 time the flush was issued.
302 utility first appeared in
305 This utility is currently under construction and not all features have been
307 In fact, most have not.