172a840f9SPawel Jakub Dawidek.\" Copyright (c) 2004 Pawel Jakub Dawidek <pjd@FreeBSD.org> 272a840f9SPawel Jakub Dawidek.\" All rights reserved. 372a840f9SPawel Jakub Dawidek.\" 472a840f9SPawel Jakub Dawidek.\" Redistribution and use in source and binary forms, with or without 572a840f9SPawel Jakub Dawidek.\" modification, are permitted provided that the following conditions 672a840f9SPawel Jakub Dawidek.\" are met: 772a840f9SPawel Jakub Dawidek.\" 1. Redistributions of source code must retain the above copyright 872a840f9SPawel Jakub Dawidek.\" notice, this list of conditions and the following disclaimer. 972a840f9SPawel Jakub Dawidek.\" 2. Redistributions in binary form must reproduce the above copyright 1072a840f9SPawel Jakub Dawidek.\" notice, this list of conditions and the following disclaimer in the 1172a840f9SPawel Jakub Dawidek.\" documentation and/or other materials provided with the distribution. 1272a840f9SPawel Jakub Dawidek.\" 1372a840f9SPawel Jakub Dawidek.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 1472a840f9SPawel Jakub Dawidek.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1572a840f9SPawel Jakub Dawidek.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1672a840f9SPawel Jakub Dawidek.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 1772a840f9SPawel Jakub Dawidek.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1872a840f9SPawel Jakub Dawidek.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1972a840f9SPawel Jakub Dawidek.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2072a840f9SPawel Jakub Dawidek.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2172a840f9SPawel Jakub Dawidek.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2272a840f9SPawel Jakub Dawidek.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2372a840f9SPawel Jakub Dawidek.\" SUCH DAMAGE. 2472a840f9SPawel Jakub Dawidek.\" 2572a840f9SPawel Jakub Dawidek.\" $FreeBSD$ 2672a840f9SPawel Jakub Dawidek.\" 27*7d49cdebSJason Helfman.Dd April 9, 2015 2872a840f9SPawel Jakub Dawidek.Dt GGATEL 8 2972a840f9SPawel Jakub Dawidek.Os 3072a840f9SPawel Jakub Dawidek.Sh NAME 3172a840f9SPawel Jakub Dawidek.Nm ggatel 3272a840f9SPawel Jakub Dawidek.Nd "GEOM Gate local control utility" 3372a840f9SPawel Jakub Dawidek.Sh SYNOPSIS 3472a840f9SPawel Jakub Dawidek.Nm 3556608006SRuslan Ermilov.Cm create 3672a840f9SPawel Jakub Dawidek.Op Fl v 3756608006SRuslan Ermilov.Op Fl o Cm ro | wo | rw 3872a840f9SPawel Jakub Dawidek.Op Fl s Ar sectorsize 3972a840f9SPawel Jakub Dawidek.Op Fl t Ar timeout 4072a840f9SPawel Jakub Dawidek.Op Fl u Ar unit 4172a840f9SPawel Jakub Dawidek.Ar path 4272a840f9SPawel Jakub Dawidek.Nm 4356608006SRuslan Ermilov.Cm destroy 4472a840f9SPawel Jakub Dawidek.Op Fl f 4572a840f9SPawel Jakub Dawidek.Fl u Ar unit 4672a840f9SPawel Jakub Dawidek.Nm 4756608006SRuslan Ermilov.Cm list 4872a840f9SPawel Jakub Dawidek.Op Fl v 4972a840f9SPawel Jakub Dawidek.Op Fl u Ar unit 50*7d49cdebSJason Helfman.Nm 51*7d49cdebSJason Helfman.Cm rescue 52*7d49cdebSJason Helfman.Op Fl v 53*7d49cdebSJason Helfman.Op Fl o Cm ro | wo | rw 54*7d49cdebSJason Helfman.Fl u Ar unit 55*7d49cdebSJason Helfman.Ar path 5672a840f9SPawel Jakub Dawidek.Sh DESCRIPTION 5772a840f9SPawel Jakub DawidekThe 5872a840f9SPawel Jakub Dawidek.Nm 5972a840f9SPawel Jakub Dawidekutility is a local GEOM Gate class consumer. 6072a840f9SPawel Jakub DawidekIt can be used as a replacement for 6172a840f9SPawel Jakub Dawidek.Xr md 4 6272a840f9SPawel Jakub Dawidekdevices or as a 6372a840f9SPawel Jakub Dawidek.Dq GEOMificator 6456608006SRuslan Ermilovfor non GEOM-aware devices, but it was mainly created as an example 6572a840f9SPawel Jakub Dawidekon how to use and how to communicate with the GEOM Gate kernel module. 6672a840f9SPawel Jakub Dawidek.Pp 6772a840f9SPawel Jakub DawidekAvailable commands: 6856608006SRuslan Ermilov.Bl -tag -width ".Cm destroy" 6956608006SRuslan Ermilov.It Cm create 7072a840f9SPawel Jakub DawidekCreate a 7172a840f9SPawel Jakub Dawidek.Nm ggate 7272a840f9SPawel Jakub Dawidekprovider related to the given regular file or device. 7356608006SRuslan Ermilov.It Cm destroy 7472a840f9SPawel Jakub DawidekDestroy the given 7572a840f9SPawel Jakub Dawidek.Nm ggate 7672a840f9SPawel Jakub Dawidekprovider. 7756608006SRuslan Ermilov.It Cm list 7872a840f9SPawel Jakub DawidekList 7972a840f9SPawel Jakub Dawidek.Nm ggate 8072a840f9SPawel Jakub Dawidekproviders. 81*7d49cdebSJason Helfman.It Cm rescue 82*7d49cdebSJason HelfmanTake over a previously created provider and handle pending and future 83*7d49cdebSJason Helfmanrequests. This is useful if the initial 84*7d49cdebSJason Helfman.Nm 85*7d49cdebSJason Helfmanprocess died. To prevent data loss, the given path must lead to the 86*7d49cdebSJason Helfmanregular file or device that was used to create the provider. 8772a840f9SPawel Jakub Dawidek.El 8872a840f9SPawel Jakub Dawidek.Pp 8972a840f9SPawel Jakub DawidekAvailable options: 9056608006SRuslan Ermilov.Bl -tag -width ".Fl s Cm ro | wo | rw" 9172a840f9SPawel Jakub Dawidek.It Fl f 9272a840f9SPawel Jakub DawidekForcibly destroy 9372a840f9SPawel Jakub Dawidek.Nm ggate 9472a840f9SPawel Jakub Dawidekprovider (cancels all pending requests). 9556608006SRuslan Ermilov.It Fl o Cm ro | wo | rw 9656608006SRuslan ErmilovSpecify permission to use when opening the file or device: read-only 9756608006SRuslan Ermilov.Pq Cm ro , 9856608006SRuslan Ermilovwrite-only 9956608006SRuslan Ermilov.Pq Cm wo , 10056608006SRuslan Ermilovor read-write 10156608006SRuslan Ermilov.Pq Cm rw . 10272a840f9SPawel Jakub DawidekDefault is 10356608006SRuslan Ermilov.Cm rw . 10472a840f9SPawel Jakub Dawidek.It Fl s Ar sectorsize 10572a840f9SPawel Jakub DawidekSector size for 10672a840f9SPawel Jakub Dawidek.Nm ggate 10772a840f9SPawel Jakub Dawidekprovider. 10856608006SRuslan ErmilovIf not specified, it is taken from device, or set to 512 bytes for files. 10972a840f9SPawel Jakub Dawidek.It Fl t Ar timeout 11072a840f9SPawel Jakub DawidekNumber of seconds to wait before an I/O request will be canceled. 11172a840f9SPawel Jakub Dawidek0 means no timeout. 11272a840f9SPawel Jakub DawidekDefault is 30. 11372a840f9SPawel Jakub Dawidek.It Fl u Ar unit 11472a840f9SPawel Jakub DawidekUnit number to use. 11572a840f9SPawel Jakub Dawidek.It Fl v 116*7d49cdebSJason HelfmanDo not fork, run in foreground and print debug information on standard 11772a840f9SPawel Jakub Dawidekoutput. 11872a840f9SPawel Jakub Dawidek.It Ar path 11972a840f9SPawel Jakub DawidekPath to a regular file or device. 12072a840f9SPawel Jakub Dawidek.El 1216087df9eSRuslan Ermilov.Sh EXIT STATUS 1226087df9eSRuslan ErmilovExit status is 0 on success, or 1 if the command fails. 1236087df9eSRuslan ErmilovTo get details about the failure, 1246087df9eSRuslan Ermilov.Nm 1256087df9eSRuslan Ermilovshould be called with the 1266087df9eSRuslan Ermilov.Fl v 1276087df9eSRuslan Ermilovoption. 12872a840f9SPawel Jakub Dawidek.Sh EXAMPLES 12972a840f9SPawel Jakub Dawidek.Dq GEOMify 13072a840f9SPawel Jakub Dawidekthe 13156608006SRuslan Ermilov.Dq Li fd0 13272a840f9SPawel Jakub Dawidekdevice and use 13372a840f9SPawel Jakub Dawidek.Xr gbde 8 13472a840f9SPawel Jakub Dawidekto encrypt data on a floppy. 13572a840f9SPawel Jakub Dawidek.Bd -literal -offset indent 136881a65c4SPawel Jakub Dawidekggatel create -u 5 /dev/fd0 13772a840f9SPawel Jakub Dawidekgbde init /dev/ggate5 13872a840f9SPawel Jakub Dawidekgbde attach ggate5 13972a840f9SPawel Jakub Dawideknewfs /dev/ggate5.bde 14072a840f9SPawel Jakub Dawidekmount /dev/ggate5.bde /secret 14172a840f9SPawel Jakub Dawidekcp /private/foo /secret/ 14272a840f9SPawel Jakub Dawidekumount /secret 14372a840f9SPawel Jakub Dawidekgbde detach ggate5 144881a65c4SPawel Jakub Dawidekggatel destroy -u 5 14572a840f9SPawel Jakub Dawidek.Ed 14672a840f9SPawel Jakub Dawidek.Sh SEE ALSO 14772a840f9SPawel Jakub Dawidek.Xr geom 4 , 14872a840f9SPawel Jakub Dawidek.Xr gbde 8 , 14972a840f9SPawel Jakub Dawidek.Xr ggatec 8 , 15072a840f9SPawel Jakub Dawidek.Xr ggated 8 , 15172a840f9SPawel Jakub Dawidek.Xr mount 8 , 15272a840f9SPawel Jakub Dawidek.Xr newfs 8 15372a840f9SPawel Jakub Dawidek.Sh AUTHORS 15472a840f9SPawel Jakub DawidekThe 15572a840f9SPawel Jakub Dawidek.Nm 15672a840f9SPawel Jakub Dawidekutility as well as this manual page was written by 157bd0891ceSBaptiste Daroussin.An Pawel Jakub Dawidek Aq Mt pjd@FreeBSD.org . 158