2004-04-30 16:15:13 +00:00
|
|
|
.\" Copyright (c) 2004 Pawel Jakub Dawidek <pjd@FreeBSD.org>
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
|
|
|
.\" $FreeBSD$
|
|
|
|
.\"
|
2015-07-14 14:01:33 +00:00
|
|
|
.Dd July 14, 2015
|
2004-04-30 16:15:13 +00:00
|
|
|
.Dt GGATEL 8
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm ggatel
|
|
|
|
.Nd "GEOM Gate local control utility"
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
2004-05-12 07:34:05 +00:00
|
|
|
.Cm create
|
2004-04-30 16:15:13 +00:00
|
|
|
.Op Fl v
|
2004-05-12 07:34:05 +00:00
|
|
|
.Op Fl o Cm ro | wo | rw
|
2004-04-30 16:15:13 +00:00
|
|
|
.Op Fl s Ar sectorsize
|
|
|
|
.Op Fl t Ar timeout
|
|
|
|
.Op Fl u Ar unit
|
|
|
|
.Ar path
|
|
|
|
.Nm
|
2004-05-12 07:34:05 +00:00
|
|
|
.Cm destroy
|
2004-04-30 16:15:13 +00:00
|
|
|
.Op Fl f
|
|
|
|
.Fl u Ar unit
|
|
|
|
.Nm
|
2004-05-12 07:34:05 +00:00
|
|
|
.Cm list
|
2004-04-30 16:15:13 +00:00
|
|
|
.Op Fl v
|
|
|
|
.Op Fl u Ar unit
|
2015-04-09 20:58:38 +00:00
|
|
|
.Nm
|
|
|
|
.Cm rescue
|
|
|
|
.Op Fl v
|
|
|
|
.Op Fl o Cm ro | wo | rw
|
|
|
|
.Fl u Ar unit
|
|
|
|
.Ar path
|
2004-04-30 16:15:13 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility is a local GEOM Gate class consumer.
|
|
|
|
It can be used as a replacement for
|
|
|
|
.Xr md 4
|
|
|
|
devices or as a
|
|
|
|
.Dq GEOMificator
|
2004-05-12 07:34:05 +00:00
|
|
|
for non GEOM-aware devices, but it was mainly created as an example
|
2015-07-14 14:01:33 +00:00
|
|
|
on how to use and how to communicate with the GEOM Gate kernel subsystem.
|
2004-04-30 16:15:13 +00:00
|
|
|
.Pp
|
|
|
|
Available commands:
|
2004-05-12 07:34:05 +00:00
|
|
|
.Bl -tag -width ".Cm destroy"
|
|
|
|
.It Cm create
|
2004-04-30 16:15:13 +00:00
|
|
|
Create a
|
|
|
|
.Nm ggate
|
|
|
|
provider related to the given regular file or device.
|
2004-05-12 07:34:05 +00:00
|
|
|
.It Cm destroy
|
2004-04-30 16:15:13 +00:00
|
|
|
Destroy the given
|
|
|
|
.Nm ggate
|
|
|
|
provider.
|
2004-05-12 07:34:05 +00:00
|
|
|
.It Cm list
|
2004-04-30 16:15:13 +00:00
|
|
|
List
|
|
|
|
.Nm ggate
|
|
|
|
providers.
|
2015-04-09 20:58:38 +00:00
|
|
|
.It Cm rescue
|
|
|
|
Take over a previously created provider and handle pending and future
|
|
|
|
requests. This is useful if the initial
|
|
|
|
.Nm
|
2015-07-14 14:01:33 +00:00
|
|
|
process died.
|
|
|
|
To prevent data loss, the given path must lead to the
|
2015-04-09 20:58:38 +00:00
|
|
|
regular file or device that was used to create the provider.
|
2004-04-30 16:15:13 +00:00
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
Available options:
|
2004-05-12 07:34:05 +00:00
|
|
|
.Bl -tag -width ".Fl s Cm ro | wo | rw"
|
2004-04-30 16:15:13 +00:00
|
|
|
.It Fl f
|
|
|
|
Forcibly destroy
|
|
|
|
.Nm ggate
|
|
|
|
provider (cancels all pending requests).
|
2004-05-12 07:34:05 +00:00
|
|
|
.It Fl o Cm ro | wo | rw
|
2015-07-14 14:01:33 +00:00
|
|
|
Specify permissions to use when opening the file or device: read-only
|
2004-05-12 07:34:05 +00:00
|
|
|
.Pq Cm ro ,
|
|
|
|
write-only
|
|
|
|
.Pq Cm wo ,
|
|
|
|
or read-write
|
|
|
|
.Pq Cm rw .
|
2004-04-30 16:15:13 +00:00
|
|
|
Default is
|
2004-05-12 07:34:05 +00:00
|
|
|
.Cm rw .
|
2004-04-30 16:15:13 +00:00
|
|
|
.It Fl s Ar sectorsize
|
|
|
|
Sector size for
|
|
|
|
.Nm ggate
|
|
|
|
provider.
|
2015-07-14 14:01:33 +00:00
|
|
|
If not specified, it is taken from the device, or set to 512 bytes for files.
|
2004-04-30 16:15:13 +00:00
|
|
|
.It Fl t Ar timeout
|
|
|
|
Number of seconds to wait before an I/O request will be canceled.
|
|
|
|
0 means no timeout.
|
|
|
|
Default is 30.
|
|
|
|
.It Fl u Ar unit
|
|
|
|
Unit number to use.
|
|
|
|
.It Fl v
|
2015-04-09 20:58:38 +00:00
|
|
|
Do not fork, run in foreground and print debug information on standard
|
2004-04-30 16:15:13 +00:00
|
|
|
output.
|
|
|
|
.It Ar path
|
|
|
|
Path to a regular file or device.
|
|
|
|
.El
|
2005-01-18 10:09:38 +00:00
|
|
|
.Sh EXIT STATUS
|
|
|
|
Exit status is 0 on success, or 1 if the command fails.
|
|
|
|
To get details about the failure,
|
|
|
|
.Nm
|
|
|
|
should be called with the
|
|
|
|
.Fl v
|
|
|
|
option.
|
2004-04-30 16:15:13 +00:00
|
|
|
.Sh EXAMPLES
|
|
|
|
.Dq GEOMify
|
|
|
|
the
|
2004-05-12 07:34:05 +00:00
|
|
|
.Dq Li fd0
|
2004-04-30 16:15:13 +00:00
|
|
|
device and use
|
|
|
|
.Xr gbde 8
|
2015-07-14 14:01:33 +00:00
|
|
|
to encrypt data on a floppy disk.
|
2004-04-30 16:15:13 +00:00
|
|
|
.Bd -literal -offset indent
|
2004-05-03 21:29:22 +00:00
|
|
|
ggatel create -u 5 /dev/fd0
|
2004-04-30 16:15:13 +00:00
|
|
|
gbde init /dev/ggate5
|
|
|
|
gbde attach ggate5
|
|
|
|
newfs /dev/ggate5.bde
|
|
|
|
mount /dev/ggate5.bde /secret
|
|
|
|
cp /private/foo /secret/
|
|
|
|
umount /secret
|
|
|
|
gbde detach ggate5
|
2004-05-03 21:29:22 +00:00
|
|
|
ggatel destroy -u 5
|
2004-04-30 16:15:13 +00:00
|
|
|
.Ed
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr geom 4 ,
|
|
|
|
.Xr gbde 8 ,
|
|
|
|
.Xr ggatec 8 ,
|
|
|
|
.Xr ggated 8 ,
|
|
|
|
.Xr mount 8 ,
|
|
|
|
.Xr newfs 8
|
|
|
|
.Sh AUTHORS
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility as well as this manual page was written by
|
2014-06-20 09:40:43 +00:00
|
|
|
.An Pawel Jakub Dawidek Aq Mt pjd@FreeBSD.org .
|