xref: /freebsd/sbin/ggate/ggatel/ggatel.8 (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
1.\" Copyright (c) 2004 Pawel Jakub Dawidek <pjd@FreeBSD.org>
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.Dd September 8, 2016
26.Dt GGATEL 8
27.Os
28.Sh NAME
29.Nm ggatel
30.Nd "GEOM Gate local control utility"
31.Sh SYNOPSIS
32.Nm
33.Cm create
34.Op Fl v
35.Oo Fl o option Oc ...
36.Op Fl s Ar sectorsize
37.Op Fl t Ar timeout
38.Op Fl u Ar unit
39.Ar path
40.Nm
41.Cm destroy
42.Op Fl f
43.Fl u Ar unit
44.Nm
45.Cm list
46.Op Fl v
47.Op Fl u Ar unit
48.Nm
49.Cm rescue
50.Op Fl v
51.Oo Fl o option Oc ...
52.Fl u Ar unit
53.Ar path
54.Sh DESCRIPTION
55The
56.Nm
57utility is a local GEOM Gate class consumer.
58It can be used as a replacement for
59.Xr md 4
60devices or as a
61.Dq GEOMificator
62for non GEOM-aware devices, but it was mainly created as an example
63on how to use and how to communicate with the GEOM Gate kernel subsystem.
64.Pp
65Available commands:
66.Bl -tag -width ".Cm destroy"
67.It Cm create
68Create a
69.Nm ggate
70provider related to the given regular file or device.
71.It Cm destroy
72Destroy the given
73.Nm ggate
74provider.
75.It Cm list
76List
77.Nm ggate
78providers.
79.It Cm rescue
80Take over a previously created provider and handle pending and future
81requests.
82This is useful if the initial
83.Nm
84process died.
85To prevent data loss, the given path must lead to the
86regular file or device that was used to create the provider.
87.El
88.Pp
89Available options:
90.Bl -tag -width ".Fl s Cm ro | wo | rw"
91.It Fl f
92Forcibly destroy
93.Nm ggate
94provider (cancels all pending requests).
95.It Fl o Ar option
96Specify permissions and options to use when opening the file or device.
97.Bl -tag -width indent
98.It Cm ro
99read-only
100.It Cm wo
101write-only
102.It Cm rw
103read-write
104.It Cm direct
105open with
106.Dv O_DIRECT
107option on the file
108.El
109.Pp
110Default is
111.Cm rw .
112.It Fl s Ar sectorsize
113Sector size for
114.Nm ggate
115provider.
116If not specified, it is taken from the device, or set to 512 bytes for files.
117.It Fl t Ar timeout
118Number of seconds to wait before an I/O request will be canceled.
1190 means no timeout.
120Default is 30.
121.It Fl u Ar unit
122Unit number to use.
123.It Fl v
124Do not fork, run in foreground and print debug information on standard
125output.
126.It Ar path
127Path to a regular file or device.
128.El
129.Sh EXIT STATUS
130Exit status is 0 on success, or 1 if the command fails.
131To get details about the failure,
132.Nm
133should be called with the
134.Fl v
135option.
136.Sh SEE ALSO
137.Xr geom 4 ,
138.Xr ggatec 8 ,
139.Xr ggated 8 ,
140.Xr mount 8 ,
141.Xr newfs 8
142.Sh HISTORY
143The
144.Nm
145utility appeared in
146.Fx 5.3 .
147.Sh AUTHORS
148The
149.Nm
150utility as well as this manual page was written by
151.An Pawel Jakub Dawidek Aq Mt pjd@FreeBSD.org .
152