xref: /freebsd/sbin/geom/core/geom.8 (revision 1e413cf93298b5b97441a21d9a50fdcd0ee9945e)
1.\" Copyright (c) 2004-2005 Pawel Jakub Dawidek <pjd@FreeBSD.org>
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD$
26.\"
27.Dd May 21, 2004
28.Dt GEOM 8
29.Os
30.Sh NAME
31.Nm geom
32.Nd "universal control utility for GEOM classes"
33.Sh SYNOPSIS
34.Nm
35.Ar class
36.Cm help
37.Nm
38.Ar class
39.Cm list
40.Op Ar name ...
41.Nm
42.Ar class
43.Cm status
44.Op Fl s
45.Op Ar name ...
46.Nm
47.Ar class
48.Cm load
49.Op Fl v
50.Nm
51.Ar class
52.Cm unload
53.Op Fl v
54.Sh DESCRIPTION
55The
56.Nm
57utility is used to control various GEOM classes.
58A class has to be aware of
59.Xr geom 8
60comunication methods, but there are also some standard commands
61which can be used for existing
62.Xr geom 8
63unaware classes.
64Here is the list of standard commands:
65.Bl -tag -width ".Cm status"
66.It Cm help
67List all available commands for the given class.
68.It Cm list
69Print detailed information (within the given class) about all geoms
70(if no additional arguments were specified) or the given geoms.
71This command is only available if the given class exists in the kernel.
72.It Cm status
73Print general information (within the given class) about all geoms
74(if no additional arguments were specified) or the given geoms.
75This command is only available if the given class exists in the kernel.
76.Pp
77Additional options include:
78.Bl -tag -width ".Fl s"
79.It Fl s
80Produce script-friendly output.
81.El
82.It Cm load
83Load the kernel module that implements the given class.
84This command is only available if the class does not yet exist in the kernel and
85the file
86.Pa geom_ Ns Ao Ar class Ac Ns Pa .ko
87can be found in one of the directories specifed in
88.Va kern.module_path
89sysctl.
90.It Cm unload
91Unload the kernel module which implements the given class.
92This command is only available if the given class is loaded as a
93kernel module.
94.El
95.Pp
96Class-specific commands are implemented as shared libraries which
97are stored in
98.Pa /lib/geom/
99directory and are loaded via
100.Xr dlopen 3
101function when the class name is known.
102When a class-specific shared library exists, a direct utility should also be
103available under the name of
104.Nm g Ns Ar class .
105.Pp
106Currently available classes which are aware of
107.Xr geom 8 :
108.Pp
109.Bl -bullet -offset indent -compact
110.It
111CONCAT
112.It
113ELI
114.It
115LABEL
116.It
117MIRROR
118.It
119NOP
120.It
121RAID3
122.It
123SHSEC
124.It
125STRIPE
126.It
127VIRSTOR
128.El
129.Sh ENVIRONMENT
130The following environment variables affect the execution of
131.Nm :
132.Bl -tag -width ".Ev GEOM_LIBRARY_PATH"
133.It Ev GEOM_LIBRARY_PATH
134Specifies the path where shared libraries are stored instead of
135.Pa /lib/geom/ .
136.El
137.Sh EXIT STATUS
138Exit status is 0 on success, and 1 if the command fails.
139.Sh EXAMPLES
140The following example shows how to set up a stripe on three disks for automatic
141configuration:
142.Bd -literal -offset indent
143geom stripe label -v -s 65536 data /dev/da0 /dev/da1 /dev/da2
144or:
145gstripe label -v -s 65536 data /dev/da0 /dev/da1 /dev/da2
146.Ed
147.Pp
148Print the list of all providers from the DISK class:
149.Bd -literal -offset indent
150geom disk list
151.Ed
152.Pp
153Unload a kernel module which implements the MD class:
154.Bd -literal -offset indent
155geom md unload
156.Ed
157.Sh SEE ALSO
158.Xr geom 4 ,
159.Xr gconcat 8 ,
160.Xr geli 8 ,
161.Xr glabel 8 ,
162.Xr gmirror 8 ,
163.Xr gnop 8 ,
164.Xr graid3 8 ,
165.Xr gshsec 8 ,
166.Xr gstripe 8 ,
167.Xr gvirstor 8
168.Sh HISTORY
169The
170.Nm
171utility appeared in
172.Fx 5.3 .
173.Sh AUTHORS
174.An Pawel Jakub Dawidek Aq pjd@FreeBSD.org
175