xref: /freebsd/sbin/ggate/ggatec/ggatec.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 GGATEC 8
27.Os
28.Sh NAME
29.Nm ggatec
30.Nd "GEOM Gate network client and control utility"
31.Sh SYNOPSIS
32.Nm
33.Cm create
34.Op Fl n
35.Op Fl v
36.Op Fl o Cm ro | wo | rw
37.Op Fl o Cm direct
38.Op Fl p Ar port
39.Op Fl q Ar queue_size
40.Op Fl R Ar rcvbuf
41.Op Fl S Ar sndbuf
42.Op Fl s Ar sectorsize
43.Op Fl t Ar timeout
44.Op Fl u Ar unit
45.Ar host
46.Ar path
47.Nm
48.Cm rescue
49.Op Fl n
50.Op Fl v
51.Op Fl o Cm ro | wo | rw
52.Op Fl o Cm direct
53.Op Fl p Ar port
54.Op Fl R Ar rcvbuf
55.Op Fl S Ar sndbuf
56.Fl u Ar unit
57.Ar host
58.Ar path
59.Nm
60.Cm destroy
61.Op Fl f
62.Fl u Ar unit
63.Nm
64.Cm list
65.Op Fl v
66.Op Fl u Ar unit
67.Sh DESCRIPTION
68The
69.Nm
70utility is a network client for the GEOM Gate class.
71It is responsible for the creation of
72.Nm ggate
73devices and forwarding I/O requests between the
74.Nm GEOM Gate
75kernel subsystem and the
76.Xr ggated 8
77network daemon.
78Available commands:
79.Bl -tag -width ".Cm destroy"
80.It Cm create
81Connect to a
82.Xr ggated 8
83daemon on the specified host and create a
84.Nm ggate
85provider for the specified remote file or device.
86.It Cm rescue
87Create a new connection after the
88.Nm
89process has died or been killed.
90The new connection to the
91.Xr ggated 8
92daemon handles pending and future requests.
93.It Cm destroy
94Destroy the given
95.Nm ggate
96provider.
97.It Cm list
98List
99.Nm ggate
100providers.
101.El
102.Pp
103Available options:
104.Bl -tag -width ".Fl s Cm ro | wo | rw"
105.It Fl f
106Forcibly destroy
107.Nm ggate
108provider (cancels all pending requests).
109.It Fl n
110Do not use
111.Dv TCP_NODELAY
112option on TCP sockets.
113.It Fl o Ar option
114Specify permissions and options to use when opening the file or device.
115.Bl -tag -width indent
116.It Cm ro
117read-only
118.It Cm wo
119write-only
120.It Cm rw
121read-write
122.It Cm direct
123open with
124.Dv O_DIRECT
125option on the file
126.El
127.Pp
128Default is
129.Cm rw .
130.It Fl p Ar port
131Port to connect to on the remote host.
132Default is 3080.
133.It Fl q Ar queue_size
134Number of pending I/O requests that can be queued before they will
135start to be canceled.
136Default is 1024.
137.It Fl R Ar rcvbuf
138Size of receive buffer to use.
139Default is 131072 (128kB).
140.It Fl S Ar sndbuf
141Size of send buffer to use.
142Default is 131072 (128kB).
143.It Fl s Ar sectorsize
144Sector size for
145.Nm ggate
146provider.
147If not specified, it is taken from the device, or set to 512 bytes for files.
148.It Fl t Ar timeout
149Number of seconds to wait before an I/O request will be canceled.
150Default is 0, which means no timeout.
151.It Fl u Ar unit
152Unit number to use.
153.It Fl v
154Do not fork, run in foreground and print debug information on standard
155output.
156.It Ar host
157Remote host to connect to.
158.It Ar path
159Path to a regular file or device.
160.El
161.Sh EXIT STATUS
162Exit status is 0 on success, or 1 if the command fails.
163To get details about the failure,
164.Nm
165should be called with the
166.Fl v
167option.
168.Sh EXAMPLES
169Use a CD-ROM device on a remote host.
170.Bd -literal -offset indent
171server# cat /etc/gg.exports
172client RO /dev/cd0
173client RW /tmp/image
174server# ggated
175
176client# ggatec create -o ro server /dev/cd0
177ggate0
178client# mount_cd9660 /dev/ggate0 /cdrom
179client# ggatec create -o rw -o direct server /tmp/image
180ggate1
181.Ed
182.Sh SEE ALSO
183.Xr geom 4 ,
184.Xr ggated 8 ,
185.Xr ggatel 8 ,
186.Xr mount_cd9660 8
187.Sh HISTORY
188The
189.Nm
190utility appeared in
191.Fx 5.3 .
192.Sh AUTHORS
193The
194.Nm
195utility as well as this manual page was written by
196.An Pawel Jakub Dawidek Aq Mt pjd@FreeBSD.org .
197