1d1d669bdSPawel Jakub Dawidek.\" Copyright (c) 2004 Pawel Jakub Dawidek <pjd@FreeBSD.org> 2d1d669bdSPawel Jakub Dawidek.\" All rights reserved. 3d1d669bdSPawel Jakub Dawidek.\" 4d1d669bdSPawel Jakub Dawidek.\" Redistribution and use in source and binary forms, with or without 5d1d669bdSPawel Jakub Dawidek.\" modification, are permitted provided that the following conditions 6d1d669bdSPawel Jakub Dawidek.\" are met: 7d1d669bdSPawel Jakub Dawidek.\" 1. Redistributions of source code must retain the above copyright 8d1d669bdSPawel Jakub Dawidek.\" notice, this list of conditions and the following disclaimer. 9d1d669bdSPawel Jakub Dawidek.\" 2. Redistributions in binary form must reproduce the above copyright 10d1d669bdSPawel Jakub Dawidek.\" notice, this list of conditions and the following disclaimer in the 11d1d669bdSPawel Jakub Dawidek.\" documentation and/or other materials provided with the distribution. 12d1d669bdSPawel Jakub Dawidek.\" 13d1d669bdSPawel Jakub Dawidek.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 14d1d669bdSPawel Jakub Dawidek.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15d1d669bdSPawel Jakub Dawidek.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16d1d669bdSPawel Jakub Dawidek.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 17d1d669bdSPawel Jakub Dawidek.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18d1d669bdSPawel Jakub Dawidek.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19d1d669bdSPawel Jakub Dawidek.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20d1d669bdSPawel Jakub Dawidek.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21d1d669bdSPawel Jakub Dawidek.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22d1d669bdSPawel Jakub Dawidek.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23d1d669bdSPawel Jakub Dawidek.\" SUCH DAMAGE. 24d1d669bdSPawel Jakub Dawidek.\" 250fcf43f6SAllan Jude.Dd September 8, 2016 26d1d669bdSPawel Jakub Dawidek.Dt GGATED 8 27d1d669bdSPawel Jakub Dawidek.Os 28d1d669bdSPawel Jakub Dawidek.Sh NAME 29d1d669bdSPawel Jakub Dawidek.Nm ggated 30d1d669bdSPawel Jakub Dawidek.Nd "GEOM Gate network daemon" 31d1d669bdSPawel Jakub Dawidek.Sh SYNOPSIS 32d1d669bdSPawel Jakub Dawidek.Nm 33d1d669bdSPawel Jakub Dawidek.Op Fl h 34d1d669bdSPawel Jakub Dawidek.Op Fl n 35d1d669bdSPawel Jakub Dawidek.Op Fl v 36d1d669bdSPawel Jakub Dawidek.Op Fl a Ar address 37d1d669bdSPawel Jakub Dawidek.Op Fl p Ar port 38fc7e71c5SEnji Cooper.Op Fl F Ar pidfile 39d1d669bdSPawel Jakub Dawidek.Op Fl R Ar rcvbuf 40d1d669bdSPawel Jakub Dawidek.Op Fl S Ar sndbuf 41d1d669bdSPawel Jakub Dawidek.Op Ar "exports file" 42d1d669bdSPawel Jakub Dawidek.Sh DESCRIPTION 43d1d669bdSPawel Jakub DawidekThe 44d1d669bdSPawel Jakub Dawidek.Nm 45b29fdbd8SChristian Bruefferutility is a network server for the GEOM Gate class. 46d1d669bdSPawel Jakub DawidekIt runs on a server machine to service GEOM Gate requests from workers 47d1d669bdSPawel Jakub Dawidekplaced on a client machine. 48b29fdbd8SChristian BruefferKeep in mind, that connections between 4956608006SRuslan Ermilov.Xr ggatec 8 50d1d669bdSPawel Jakub Dawidekand 5156608006SRuslan Ermilov.Nm 52b29fdbd8SChristian Bruefferare not encrypted. 53d1d669bdSPawel Jakub Dawidek.Pp 54d1d669bdSPawel Jakub DawidekAvailable options: 5556608006SRuslan Ermilov.Bl -tag -width ".Ar exports\ file" 56d1d669bdSPawel Jakub Dawidek.It Fl a Ar address 57d1d669bdSPawel Jakub DawidekSpecifies an IP address to bind to. 58d1d669bdSPawel Jakub Dawidek.It Fl h 59d1d669bdSPawel Jakub DawidekPrint available options. 60d1d669bdSPawel Jakub Dawidek.It Fl n 6156608006SRuslan ErmilovDo not use 6256608006SRuslan Ermilov.Dv TCP_NODELAY 6356608006SRuslan Ermilovoption on TCP sockets. 64d1d669bdSPawel Jakub Dawidek.It Fl p Ar port 65d1d669bdSPawel Jakub DawidekPort on which 66d1d669bdSPawel Jakub Dawidek.Nm 67b29fdbd8SChristian Bruefferlistens for connections. 6856608006SRuslan ErmilovDefault is 3080. 69fc7e71c5SEnji Cooper.It Fl F Ar pidfile 70fc7e71c5SEnji CooperPID file that 71fc7e71c5SEnji Cooper.Nm 72fc7e71c5SEnji Cooperuses. 73d1d669bdSPawel Jakub Dawidek.It Fl R Ar rcvbuf 74d1d669bdSPawel Jakub DawidekSize of receive buffer to use. 75d1d669bdSPawel Jakub DawidekDefault is 131072 (128kB). 76d1d669bdSPawel Jakub Dawidek.It Fl S Ar sndbuf 77d1d669bdSPawel Jakub DawidekSize of send buffer to use. 78d1d669bdSPawel Jakub DawidekDefault is 131072 (128kB). 79d1d669bdSPawel Jakub Dawidek.It Fl v 80b29fdbd8SChristian BruefferDo not fork, run in foreground and print debug information on standard 81d1d669bdSPawel Jakub Dawidekoutput. 82d1d669bdSPawel Jakub Dawidek.It Ar "exports file" 83d1d669bdSPawel Jakub DawidekAn alternate location for the exports file. 84d1d669bdSPawel Jakub Dawidek.El 85d1d669bdSPawel Jakub Dawidek.Pp 86d1d669bdSPawel Jakub DawidekThe format of an exports file is as follows: 87d1d669bdSPawel Jakub Dawidek.Bd -literal -offset indent 88c650c2f3SAlex Kozlov1.2.3.4 RO /dev/cd0 89d1d669bdSPawel Jakub Dawidek1.2.3.0/24 RW /tmp/test.img 90d1d669bdSPawel Jakub Dawidekhostname WO /tmp/image 91*1b1e392aSDavid E. Crosshostname RW,DIRECT /tmp/direct-image 92*1b1e392aSDavid E. Crosshostname RW,NODIRECT /tmp/nodirect-image 93d1d669bdSPawel Jakub Dawidek.Ed 94*1b1e392aSDavid E. Cross.Pp 95*1b1e392aSDavid E. CrossThe first colunm specifies the ip, network with netmask, or the hostname 96*1b1e392aSDavid E. Crossthat the export applies to. 97*1b1e392aSDavid E. Cross.Pp 98*1b1e392aSDavid E. CrossThe next column is the access flags that apply to the export 99*1b1e392aSDavid E. Cross.Bl -tag -width ".Cm NODIRECT" 100*1b1e392aSDavid E. Cross.It Cm RO 101*1b1e392aSDavid E. CrossRead-Only the path specified will be exported to the client read only. 102*1b1e392aSDavid E. Cross.It Cm WO 103*1b1e392aSDavid E. CrossWrite-Only the path specified will be exported to the client write only. 104*1b1e392aSDavid E. Cross.It Cm RW 105*1b1e392aSDavid E. CrossRead-Write the path specified will be exported to the client read-write. 106*1b1e392aSDavid E. Cross.It Cm DIRECT 107*1b1e392aSDavid E. CrossThe path specified will always be opened with O_DIRECT for clients. 108*1b1e392aSDavid E. Cross.It Cm NODIRECT 109*1b1e392aSDavid E. CrossThe path specified will never be opened with O_DIRECT for clients. 110*1b1e392aSDavid E. Cross.El 111*1b1e392aSDavid E. Cross.Pp 112*1b1e392aSDavid E. CrossThe final column specifies the path to export. 113*1b1e392aSDavid E. Cross.Pp 114*1b1e392aSDavid E. CrossFiles are opened with the least common flags between the client and the 115*1b1e392aSDavid E. Crossserver. A client may request read or write only to a read-write export 116*1b1e392aSDavid E. Crossand the server will honor the client request and open the file in the 117*1b1e392aSDavid E. Crossrequested mode. A client requesting greater access than permissions listed 118*1b1e392aSDavid E. Crossin the file will be rejected. 119*1b1e392aSDavid E. Cross.Pp 120*1b1e392aSDavid E. CrossDIRECT and NODIRECT are used to coerce the use of the O_DIRECT flag to 121*1b1e392aSDavid E. Cross.Xr open 2 when the specified path is opened. If DIRECT is specified the 122*1b1e392aSDavid E. Crosspath is always opened with O_DIRECT. If NODIRECT is specified the path is 123*1b1e392aSDavid E. Crossnever opened with O_DIRECT. DIRECT access limits the cache effects of 124*1b1e392aSDavid E. CrossIO operaions on the file. This has the effect of having clients accessing 125*1b1e392aSDavid E. Crossexports to not impact the cache of the local machine, however it 126*1b1e392aSDavid E. Crosswill cause greater IO utilization to the devices on which the files reside. 127*1b1e392aSDavid E. Cross.Pp 128*1b1e392aSDavid E. CrossIf neither is specified the server will use 129*1b1e392aSDavid E. Crossthe preference specified by the client, with the default to not use O_DIRECT. 130*1b1e392aSDavid E. CrossIf the client specifies a preference against the server's configuration the 131*1b1e392aSDavid E. Crossclient preference will be silently ignored. 132*1b1e392aSDavid E. Cross.Pp 133fc7e71c5SEnji Cooper.Sh FILES 134fc7e71c5SEnji Cooper.Bl -tag -width ".Pa /var/run/ggated.pid" -compact 135fc7e71c5SEnji Cooper.It Pa /var/run/ggated.pid 136fc7e71c5SEnji CooperThe default location of the 137fc7e71c5SEnji Cooper.Nm 138fc7e71c5SEnji CooperPID file. 139fc7e71c5SEnji Cooper.El 140a866e170SRuslan Ermilov.Sh EXIT STATUS 141d1d669bdSPawel Jakub DawidekExit status is 0 on success, or 1 if the command fails. 142d1d669bdSPawel Jakub DawidekTo get details about the failure, 143d1d669bdSPawel Jakub Dawidek.Nm 144d1d669bdSPawel Jakub Dawidekshould be called with the 145d1d669bdSPawel Jakub Dawidek.Fl v 146d1d669bdSPawel Jakub Dawidekoption. 1476087df9eSRuslan Ermilov.Sh EXAMPLES 148*1b1e392aSDavid E. CrossExport CD-ROM device, a file, and a file with 149*1b1e392aSDavid E. Cross.Dv O_DIRECT 150*1b1e392aSDavid E. Crossoption: 1516087df9eSRuslan Ermilov.Bd -literal -offset indent 152c650c2f3SAlex Kozlov# echo "1.2.3.0/24 RO /dev/cd0" > /etc/gg.exports 1536087df9eSRuslan Ermilov# echo "client RW /image" >> /etc/gg.exports 154*1b1e392aSDavid E. Cross# echo "client RW,DIRECT /image2" >> /etc/gg.exports 155*1b1e392aSDavid E. Cross# echo "client RW,NODIRECT /image3" >> /etc/gg.exports 1566087df9eSRuslan Ermilov# ggated 1576087df9eSRuslan Ermilov.Ed 158d1d669bdSPawel Jakub Dawidek.Sh SEE ALSO 159*1b1e392aSDavid E. Cross.Xr open 2 , 160d1d669bdSPawel Jakub Dawidek.Xr geom 4 , 161d1d669bdSPawel Jakub Dawidek.Xr ggatec 8 , 162d1d669bdSPawel Jakub Dawidek.Xr ggatel 8 1630fcf43f6SAllan Jude.Sh HISTORY 1640fcf43f6SAllan JudeThe 1650fcf43f6SAllan Jude.Nm 1660fcf43f6SAllan Judeutility appeared in 1670fcf43f6SAllan Jude.Fx 5.3 . 168d1d669bdSPawel Jakub Dawidek.Sh AUTHORS 169d1d669bdSPawel Jakub DawidekThe 170d1d669bdSPawel Jakub Dawidek.Nm 171d1d669bdSPawel Jakub Dawidekutility as well as this manual page was written by 172bd0891ceSBaptiste Daroussin.An Pawel Jakub Dawidek Aq Mt pjd@FreeBSD.org . 173