xref: /freebsd/sbin/ggate/ggatel/ggatel.8 (revision bb15ca603fa442c72dde3f3cb8b46db6970e3950)
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.\" $FreeBSD$
26.\"
27.Dd April 2, 2011
28.Dt GGATEL 8
29.Os
30.Sh NAME
31.Nm ggatel
32.Nd "GEOM Gate local control utility"
33.Sh SYNOPSIS
34.Nm
35.Cm create
36.Op Fl v
37.Op Fl o Cm ro | wo | rw
38.Op Fl s Ar sectorsize
39.Op Fl t Ar timeout
40.Op Fl u Ar unit
41.Ar path
42.Nm
43.Cm attach
44.Op Fl v
45.Op Fl o Cm ro | wo | rw
46.Fl u Ar unit
47.Ar path
48.Nm
49.Cm destroy
50.Op Fl f
51.Fl u Ar unit
52.Nm
53.Cm list
54.Op Fl v
55.Op Fl u Ar unit
56.Sh DESCRIPTION
57The
58.Nm
59utility is a local GEOM Gate class consumer.
60It can be used as a replacement for
61.Xr md 4
62devices or as a
63.Dq GEOMificator
64for non GEOM-aware devices, but it was mainly created as an example
65on how to use and how to communicate with the GEOM Gate kernel module.
66.Pp
67Available commands:
68.Bl -tag -width ".Cm destroy"
69.It Cm create
70Create a
71.Nm ggate
72provider related to the given regular file or device.
73.It Cm attach
74Attach a worker process to an existing
75.Nm ggate
76provider.
77.It Cm destroy
78Destroy the given
79.Nm ggate
80provider.
81.It Cm list
82List
83.Nm ggate
84providers.
85.El
86.Pp
87Available options:
88.Bl -tag -width ".Fl s Cm ro | wo | rw"
89.It Fl f
90Forcibly destroy
91.Nm ggate
92provider (cancels all pending requests).
93.It Fl o Cm ro | wo | rw
94Specify permission to use when opening the file or device: read-only
95.Pq Cm ro ,
96write-only
97.Pq Cm wo ,
98or read-write
99.Pq Cm rw .
100Default is
101.Cm rw .
102.It Fl s Ar sectorsize
103Sector size for
104.Nm ggate
105provider.
106If not specified, it is taken from device, or set to 512 bytes for files.
107.It Fl t Ar timeout
108Number of seconds to wait before an I/O request will be canceled.
1090 means no timeout.
110Default is 30.
111.It Fl u Ar unit
112Unit number to use.
113.It Fl v
114Do not fork, run in foreground and print debug informations on standard
115output.
116.It Ar path
117Path to a regular file or device.
118.El
119.Sh EXIT STATUS
120Exit status is 0 on success, or 1 if the command fails.
121To get details about the failure,
122.Nm
123should be called with the
124.Fl v
125option.
126.Sh EXAMPLES
127.Dq GEOMify
128the
129.Dq Li fd0
130device and use
131.Xr gbde 8
132to encrypt data on a floppy.
133.Bd -literal -offset indent
134ggatel create -u 5 /dev/fd0
135gbde init /dev/ggate5
136gbde attach ggate5
137newfs /dev/ggate5.bde
138mount /dev/ggate5.bde /secret
139cp /private/foo /secret/
140umount /secret
141gbde detach ggate5
142ggatel destroy -u 5
143.Ed
144.Sh SEE ALSO
145.Xr geom 4 ,
146.Xr gbde 8 ,
147.Xr ggatec 8 ,
148.Xr ggated 8 ,
149.Xr mount 8 ,
150.Xr newfs 8
151.Sh AUTHORS
152The
153.Nm
154utility as well as this manual page was written by
155.An Pawel Jakub Dawidek Aq pjd@FreeBSD.org .
156