2005-03-13 19:38:12 +00:00
|
|
|
.\" Copyright (c) 2004-2005 Pawel Jakub Dawidek <pjd@FreeBSD.org>
|
2004-05-24 23:03:29 +00:00
|
|
|
.\" 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$
|
|
|
|
.\"
|
|
|
|
.Dd May 21, 2004
|
|
|
|
.Dt GEOM 8
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm geom
|
|
|
|
.Nd "universal control utility for GEOM classes"
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
|
|
|
.Ar class
|
|
|
|
.Ar command
|
|
|
|
.Op Ar options
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility is used to control various GEOM classes.
|
|
|
|
A class has to be aware of
|
|
|
|
.Xr geom 8
|
|
|
|
comunication methods, but there are also some standard commands
|
2004-11-04 19:12:43 +00:00
|
|
|
which can be used for existing
|
2004-05-24 23:03:29 +00:00
|
|
|
.Xr geom 8
|
2004-11-04 19:12:43 +00:00
|
|
|
unaware classes.
|
2004-05-24 23:03:29 +00:00
|
|
|
Here is the list of standard commands:
|
2005-03-13 19:38:12 +00:00
|
|
|
.Bl -tag -width ".Cm status"
|
2004-05-24 23:03:29 +00:00
|
|
|
.It Cm help
|
|
|
|
List all available commands for the given class.
|
|
|
|
.It Cm list
|
2004-07-26 17:14:47 +00:00
|
|
|
Print detailed information (within the given class) about all geoms
|
|
|
|
(if no additional arguments were specified) or the given geoms.
|
2005-03-13 19:38:12 +00:00
|
|
|
This command is only available if the given class exists in the kernel.
|
|
|
|
.It Cm status
|
|
|
|
Print general information (within the given class) about all geoms
|
|
|
|
(if no additional arguments were specified) or the given geoms.
|
2004-05-24 23:03:29 +00:00
|
|
|
This command is only available if the given class exists in the kernel.
|
2005-03-14 12:37:55 +00:00
|
|
|
.Pp
|
|
|
|
Additional options include:
|
|
|
|
.Bl -tag -width ".Fl s"
|
|
|
|
.It Fl s
|
|
|
|
Produce script-friendly output.
|
|
|
|
.El
|
2004-05-24 23:03:29 +00:00
|
|
|
.It Cm load
|
|
|
|
Load the kernel module that implements the given class.
|
2004-07-07 21:00:57 +00:00
|
|
|
This command is only available if the class does not yet exist in the kernel and
|
2004-05-24 23:03:29 +00:00
|
|
|
the file
|
2004-07-07 21:00:57 +00:00
|
|
|
.Pa geom_ Ns Ao Ar class Ac Ns Pa .ko
|
2004-05-24 23:03:29 +00:00
|
|
|
can be found in one of the directories specifed in
|
|
|
|
.Va kern.module_path
|
|
|
|
sysctl.
|
|
|
|
.It Cm unload
|
|
|
|
Unload the kernel module which implements the given class.
|
|
|
|
This command is only available if the given class is loaded as a
|
|
|
|
kernel module.
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
Class-specific commands are implemented as shared libraries which
|
|
|
|
are stored in
|
|
|
|
.Pa /lib/geom/
|
|
|
|
directory and are loaded via
|
|
|
|
.Xr dlopen 3
|
|
|
|
function when the class name is known.
|
|
|
|
When a class-specific shared library exists, a direct utility should also be
|
|
|
|
available under the name of
|
2004-07-07 21:00:57 +00:00
|
|
|
.Nm g Ns Ar class .
|
2004-05-24 23:03:29 +00:00
|
|
|
.Pp
|
|
|
|
Currently available classes which are aware of
|
|
|
|
.Xr geom 8 :
|
2004-07-07 21:00:57 +00:00
|
|
|
.Pp
|
2004-05-24 23:03:29 +00:00
|
|
|
.Bl -bullet -offset indent -compact
|
|
|
|
.It
|
|
|
|
CONCAT
|
|
|
|
.It
|
2004-08-23 06:23:17 +00:00
|
|
|
LABEL
|
|
|
|
.It
|
|
|
|
MIRROR
|
|
|
|
.It
|
2004-05-24 23:03:29 +00:00
|
|
|
NOP
|
|
|
|
.It
|
2004-08-23 06:23:17 +00:00
|
|
|
RAID3
|
|
|
|
.It
|
2005-02-27 17:56:59 +00:00
|
|
|
SHSEC
|
|
|
|
.It
|
2004-05-24 23:03:29 +00:00
|
|
|
STRIPE
|
|
|
|
.El
|
2005-02-27 21:14:58 +00:00
|
|
|
.Sh ENVIRONMENT
|
|
|
|
The following environment variables affect the execution of
|
|
|
|
.Nm :
|
|
|
|
.Bl -tag -width ".Ev GEOM_LIBRARY_PATH"
|
|
|
|
.It Ev GEOM_LIBRARY_PATH
|
|
|
|
Specifies the path where shared libraries are stored instead of
|
|
|
|
.Pa /lib/geom/ .
|
|
|
|
.El
|
2005-01-18 10:09:38 +00:00
|
|
|
.Sh EXIT STATUS
|
|
|
|
Exit status is 0 on success, and 1 if the command fails.
|
2004-05-24 23:03:29 +00:00
|
|
|
.Sh EXAMPLES
|
|
|
|
The following example shows how to set up a stripe on three disks for automatic
|
|
|
|
configuration:
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
geom stripe label -v -s 65536 data /dev/da0 /dev/da1 /dev/da2
|
|
|
|
or:
|
|
|
|
gstripe label -v -s 65536 data /dev/da0 /dev/da1 /dev/da2
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
Print the list of all providers from the DISK class:
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
geom disk list
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
Unload a kernel module which implements the MD class:
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
geom md unload
|
|
|
|
.Ed
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr geom 4 ,
|
|
|
|
.Xr gconcat 8 ,
|
2004-07-14 13:32:00 +00:00
|
|
|
.Xr glabel 8 ,
|
2004-08-18 15:48:18 +00:00
|
|
|
.Xr gmirror 8 ,
|
2004-05-24 23:03:29 +00:00
|
|
|
.Xr gnop 8 ,
|
2004-08-18 16:41:30 +00:00
|
|
|
.Xr graid3 8 ,
|
2005-02-25 17:22:23 +00:00
|
|
|
.Xr gshsec 8 ,
|
2004-05-24 23:03:29 +00:00
|
|
|
.Xr gstripe 8
|
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility appeared in
|
|
|
|
.Fx 5.3 .
|
|
|
|
.Sh AUTHORS
|
|
|
|
.An Pawel Jakub Dawidek Aq pjd@FreeBSD.org
|