1.\" Copyright (c) 2003,2004 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.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions 9.\" are met: 10.\" 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 16.\" distribution. 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. 20.\" 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 32.\" SUCH DAMAGE. 33.\" 34.\" $DragonFly: src/sbin/mountctl/mountctl.8,v 1.4 2005/07/06 06:04:32 dillon Exp $ 35.\" 36.Dd January 8, 2005 37.Dt MOUNTCTL 8 38.Os 39.Sh NAME 40.Nm mountctl 41.Nd control journaling and other features on mounted file systems 42.Sh SYNOPSIS 43.Nm 44.Fl l 45.Op Ar tag/mountpt | mountpt:tag 46.Nm 47.Fl a 48.Op Fl 2 49.Op Fl w Ar output_path 50.Op Fl x Ar filedesc 51.Op Fl o Ar option 52.Op Fl o Ar option ... 53.Ar mountpt:tag 54.Nm 55.Fl d 56.Op Ar tag/mountpt | mountpt:tag 57.Nm 58.Fl m 59.Op Fl o Ar option 60.Op Fl o Ar option ... 61.Op Ar tag/mountpt | mountpt:tag 62.Nm 63.Fl FZSCA 64.Op Ar tag/mountpt | mountpt:tag 65.Pp 66.Sh DESCRIPTION 67The 68.Nm 69utility manages journaling and (eventually) other features on a mounted 70filesystem. 71Note that a mount point path must begin with '/', and tag names must not 72begin with '/'. 73.Pp 74.Nm 75.Fl l 76will list all installed journals in the system or on a particular mount point 77or tag, including their current state of operation. 78.Pp 79.Nm 80.Fl a 81will add a new journal to a mount point. A mount may have any number of 82journals associated with it. If no output path is specified the journal 83will be written to the standard output. Options may be specified as 84described in the OPTION KEYWORDS section. 85The tag is required and must be unique 86relative to any given mount, but you can use the same tag on multiple 87mount points if you wish (and control them all together by referencing that 88tag). 89The output path may represent any streamable entity. You can, for example, 90output to a pipe into a program which does further buffering or processing 91of the journal. 92.Em WARNING 93A stalled journaling descriptor will stall the filesystem. Eventually a 94kernel-implemented swap backing will be available for journals but that is 95not the case at the moment. 96.Pp 97.Nm 98.Fl d 99will remove the specified journal(s). A mount point, a tag, or both may be 100specified. This function will operate on all matching journals. 101.Pp 102.Nm 103.Fl m 104will modify the options associated with an existing journal. Options are 105specified in the OPTION KEYWORDS section. 106.Sh OTHER OPTIONS 107.Bl -tag -width indent 108.It Fl 2 109Specify full-duplex operation. The kernel will not throw away journal 110data in its internal FIFO until the transaction id is acknowlwedged. This 111requires a full-duplex journaling descriptor. Note that shell pipes are 112full-duplex-capable. 113.It Fl F 114Flush a journal, equivalent to the 'flush' keyword. 115This option implies 116.Fl m . 117.It Fl Z 118Freeze a journal, equivalent to the 'freeze' keyword. 119This option implies 120.Fl m 121if 122.Fl a 123or 124.Fl d 125are not specified. 126.It Fl S 127Start or restart a journal, equivalent to the 'start' keyword. 128This option implies 129.Fl m . 130.It Fl C 131Close a journal, equivalent to the 'close' keyword. 132This option implies 133.Fl m . 134.It Fl A 135Abort a journal, equivalent to the 'abort' keyword. 136This option implies 137.Fl m . 138.It Fl w Ar output_path 139Change a journal's stream descriptor to the specified path. 140This option implies 141.Fl m 142if 143.Fl a 144or 145.Fl d 146are not specified. 147.It Fl x Ar filedesc 148Change a journal's stream descriptor to the specified file descriptor number. 149This option implies 150.Fl m 151if 152.Fl a 153or 154.Fl d 155are not specified. 156.El 157.Sh OPTION KEYWORDS 158Options keywords may be comma delimited without whitespace within a single 159.Fl o 160or via multiple 161.Fl o 162options. Some keywords require a value which is specified as 163.Ar keyword=value . 164Any option may be prefixed with 'no' or 'non' to turn off the option. 165Some options are one-shot and have no 'no' or 'non' equivalent. 166.Pp 167The options are as follows: 168.Bl -tag -width indent 169.It Ar reversable 170Generate a reversable journaling stream. This allows the target to run 171the journal backwards as well as forwards to 'undo' operations. This is the 172default. 173.It Ar twoway 174Indicate that the journaling stream is a two-way stream and that transaction 175id acknowledgements will be returned. This option is the same as the 176.Fl 2 177option. 178.It Ar memfifo=size[k,m] 179Specify the size of the in-kernel memory FIFO used to buffer the journaling 180stream between processes doing filesystem operations and the worker thread 181writing out the journal. Since the kernel has limited virtual memory 182buffers larger then 4MB are not recommended. 183.It Ar swapfifo=size[k,m,g] 184Specify the size of the kernel-managed swap-backed FIFO used to buffer 185overflows. 186.It Ar path=filepath 187Switch the journal's output stream to a new file. This feature is typically 188used to restart a dead stream. 189Note that the 190.Fl w 191option is equivalent to specifying the path option. Both should not be 192specified. 193.It Ar fd=filedesc 194Switch the journal's output stream to a file descriptor specified by number. 195Use file descriptor 1 if you wish to reopen the journal to the current 196stdout. This feature is typically used to restart a dead stream (for example 197if a TCP stream fails). 198Note that the 199.Fl w 200option is equivalent to specifying the path option. Both should not be 201specified. 202.It Ar freeze 203Freeze the worker thread. This may cause the filesystem to stall once 204the memory fifo has filled up. A freeze point record will be written to 205the journal. If used as part of the creation of a new journal via 206.Fl a , 207this option will prevent any initial output to the journal and a freeze 208point record will NOT be written. Again, the filesystem will stall if 209the memory fifo fills up. 210.It Ar start 211Start or restart the worker thread after a freeze. 212.It Ar close 213Close the journal. Any transactions still under way will be allowed to 214complete, a closing record will be generated, and the journaling descriptor 215will be closed. If the connection is two-way the journal will away a final 216acknowledgement of the closing record before closing the descriptor. 217.It Ar abort 218Close the journal. Any currently buffered data will be aborted. No close 219record is written. The journaling stream is immediately closed. 220.It Ar flush 221Flush the journal. All currently buffered data is flushed. The command 222does not return until the write suceeds and, if the connection is two-way, 223and acknowledgement has been returned for journaled data buffered at the 224time the flush was issued. 225.El 226.Pp 227.Sh FILES 228.Sh SEE ALSO 229.Xr mount 2 , 230.Xr jscan 8 231.Sh BUGS 232.Sh CAVEATS 233This utility is currently under construction and not all features have been 234implemented yet. In fact, most have not. 235.Sh HISTORY 236The 237.Nm 238utility first appeared in DragonFly . 239