xref: /freebsd/sbin/ggate/ggatel/ggatel.8 (revision 0fcf43f6f308e2bc2dc7a247971fded65f7186cd)
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*0fcf43f6SAllan Jude.Dd September 8, 2016
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
507d49cdebSJason Helfman.Nm
517d49cdebSJason Helfman.Cm rescue
527d49cdebSJason Helfman.Op Fl v
537d49cdebSJason Helfman.Op Fl o Cm ro | wo | rw
547d49cdebSJason Helfman.Fl u Ar unit
557d49cdebSJason 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
65b29fdbd8SChristian Bruefferon how to use and how to communicate with the GEOM Gate kernel subsystem.
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.
817d49cdebSJason Helfman.It Cm rescue
827d49cdebSJason HelfmanTake over a previously created provider and handle pending and future
83*0fcf43f6SAllan Juderequests.
84*0fcf43f6SAllan JudeThis is useful if the initial
857d49cdebSJason Helfman.Nm
86b29fdbd8SChristian Bruefferprocess died.
87b29fdbd8SChristian BruefferTo prevent data loss, the given path must lead to the
887d49cdebSJason Helfmanregular file or device that was used to create the provider.
8972a840f9SPawel Jakub Dawidek.El
9072a840f9SPawel Jakub Dawidek.Pp
9172a840f9SPawel Jakub DawidekAvailable options:
9256608006SRuslan Ermilov.Bl -tag -width ".Fl s Cm ro | wo | rw"
9372a840f9SPawel Jakub Dawidek.It Fl f
9472a840f9SPawel Jakub DawidekForcibly destroy
9572a840f9SPawel Jakub Dawidek.Nm ggate
9672a840f9SPawel Jakub Dawidekprovider (cancels all pending requests).
9756608006SRuslan Ermilov.It Fl o Cm ro | wo | rw
98b29fdbd8SChristian BruefferSpecify permissions to use when opening the file or device: read-only
9956608006SRuslan Ermilov.Pq Cm ro ,
10056608006SRuslan Ermilovwrite-only
10156608006SRuslan Ermilov.Pq Cm wo ,
10256608006SRuslan Ermilovor read-write
10356608006SRuslan Ermilov.Pq Cm rw .
10472a840f9SPawel Jakub DawidekDefault is
10556608006SRuslan Ermilov.Cm rw .
10672a840f9SPawel Jakub Dawidek.It Fl s Ar sectorsize
10772a840f9SPawel Jakub DawidekSector size for
10872a840f9SPawel Jakub Dawidek.Nm ggate
10972a840f9SPawel Jakub Dawidekprovider.
110b29fdbd8SChristian BruefferIf not specified, it is taken from the device, or set to 512 bytes for files.
11172a840f9SPawel Jakub Dawidek.It Fl t Ar timeout
11272a840f9SPawel Jakub DawidekNumber of seconds to wait before an I/O request will be canceled.
11372a840f9SPawel Jakub Dawidek0 means no timeout.
11472a840f9SPawel Jakub DawidekDefault is 30.
11572a840f9SPawel Jakub Dawidek.It Fl u Ar unit
11672a840f9SPawel Jakub DawidekUnit number to use.
11772a840f9SPawel Jakub Dawidek.It Fl v
1187d49cdebSJason HelfmanDo not fork, run in foreground and print debug information on standard
11972a840f9SPawel Jakub Dawidekoutput.
12072a840f9SPawel Jakub Dawidek.It Ar path
12172a840f9SPawel Jakub DawidekPath to a regular file or device.
12272a840f9SPawel Jakub Dawidek.El
1236087df9eSRuslan Ermilov.Sh EXIT STATUS
1246087df9eSRuslan ErmilovExit status is 0 on success, or 1 if the command fails.
1256087df9eSRuslan ErmilovTo get details about the failure,
1266087df9eSRuslan Ermilov.Nm
1276087df9eSRuslan Ermilovshould be called with the
1286087df9eSRuslan Ermilov.Fl v
1296087df9eSRuslan Ermilovoption.
13072a840f9SPawel Jakub Dawidek.Sh EXAMPLES
13172a840f9SPawel Jakub Dawidek.Dq GEOMify
13272a840f9SPawel Jakub Dawidekthe
13356608006SRuslan Ermilov.Dq Li fd0
13472a840f9SPawel Jakub Dawidekdevice and use
13572a840f9SPawel Jakub Dawidek.Xr gbde 8
136b29fdbd8SChristian Bruefferto encrypt data on a floppy disk.
13772a840f9SPawel Jakub Dawidek.Bd -literal -offset indent
138881a65c4SPawel Jakub Dawidekggatel create -u 5 /dev/fd0
13972a840f9SPawel Jakub Dawidekgbde init /dev/ggate5
14072a840f9SPawel Jakub Dawidekgbde attach ggate5
14172a840f9SPawel Jakub Dawideknewfs /dev/ggate5.bde
14272a840f9SPawel Jakub Dawidekmount /dev/ggate5.bde /secret
14372a840f9SPawel Jakub Dawidekcp /private/foo /secret/
14472a840f9SPawel Jakub Dawidekumount /secret
14572a840f9SPawel Jakub Dawidekgbde detach ggate5
146881a65c4SPawel Jakub Dawidekggatel destroy -u 5
14772a840f9SPawel Jakub Dawidek.Ed
14872a840f9SPawel Jakub Dawidek.Sh SEE ALSO
14972a840f9SPawel Jakub Dawidek.Xr geom 4 ,
15072a840f9SPawel Jakub Dawidek.Xr gbde 8 ,
15172a840f9SPawel Jakub Dawidek.Xr ggatec 8 ,
15272a840f9SPawel Jakub Dawidek.Xr ggated 8 ,
15372a840f9SPawel Jakub Dawidek.Xr mount 8 ,
15472a840f9SPawel Jakub Dawidek.Xr newfs 8
155*0fcf43f6SAllan Jude.Sh HISTORY
156*0fcf43f6SAllan JudeThe
157*0fcf43f6SAllan Jude.Nm
158*0fcf43f6SAllan Judeutility appeared in
159*0fcf43f6SAllan Jude.Fx 5.3 .
16072a840f9SPawel Jakub Dawidek.Sh AUTHORS
16172a840f9SPawel Jakub DawidekThe
16272a840f9SPawel Jakub Dawidek.Nm
16372a840f9SPawel Jakub Dawidekutility as well as this manual page was written by
164bd0891ceSBaptiste Daroussin.An Pawel Jakub Dawidek Aq Mt pjd@FreeBSD.org .
165