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