]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - sbin/geom/core/geom.8
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / sbin / geom / core / geom.8
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 January 5, 2011
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 Fl a
41 .Op Ar name ...
42 .Nm
43 .Ar class
44 .Cm status
45 .Op Fl ags
46 .Op Ar name ...
47 .Nm
48 .Ar class
49 .Cm load
50 .Op Fl v
51 .Nm
52 .Ar class
53 .Cm unload
54 .Op Fl v
55 .Sh DESCRIPTION
56 The
57 .Nm
58 utility is used to control various GEOM classes.
59 A class has to be aware of
60 .Xr geom 8
61 communication methods, but there are also some standard commands
62 which can be used for existing
63 .Xr geom 8
64 unaware classes.
65 Here is the list of standard commands:
66 .Bl -tag -width ".Cm status"
67 .It Cm help
68 List all available commands for the given class.
69 .It Cm list
70 Print detailed information (within the given class) about all geoms
71 (if no additional arguments were specified) or the given geoms.
72 This command is only available if the given class exists in the kernel.
73 Additional options include:
74 .Bl -tag -width ".Fl a"
75 .It Fl a
76 Print information for geoms without providers.
77 .El
78 .It Cm status
79 Print general information (within the given class) about all geoms
80 (if no additional arguments were specified) or the given geoms.
81 This command is only available if the given class exists in the kernel.
82 .Pp
83 Additional options include:
84 .Bl -tag -width ".Fl s"
85 .It Fl a
86 When used with -g, print status for geoms without providers.
87 .It Fl g
88 Report statuses for geoms instead of providers.
89 .It Fl s
90 Produce script-friendly output.
91 .El
92 .It Cm load
93 Load the kernel module that implements the given class.
94 This command is only available if the class does not yet exist in the kernel and
95 the file
96 .Pa geom_ Ns Ao Ar class Ac Ns Pa .ko
97 can be found in one of the directories specified in
98 .Va kern.module_path
99 sysctl.
100 .It Cm unload
101 Unload the kernel module which implements the given class.
102 This command is only available if the given class is loaded as a
103 kernel module.
104 .El
105 .Pp
106 Class-specific commands are implemented as shared libraries which
107 are stored in
108 .Pa /lib/geom/
109 directory and are loaded via
110 .Xr dlopen 3
111 function when the class name is known.
112 When a class-specific shared library exists, a direct utility should also be
113 available under the name of
114 .Nm g Ns Ar class .
115 .Pp
116 Currently available classes which are aware of
117 .Xr geom 8 :
118 .Pp
119 .Bl -bullet -offset indent -compact
120 .It
121 CACHE
122 .It
123 CONCAT
124 .It
125 ELI
126 .It
127 JOURNAL
128 .It
129 LABEL
130 .It
131 MIRROR
132 .It
133 MOUNTVER
134 .It
135 MULTIPATH
136 .It
137 NOP
138 .It
139 PART
140 .It
141 RAID
142 .It
143 RAID3
144 .It
145 SCHED
146 .It
147 SHSEC
148 .It
149 STRIPE
150 .It
151 VIRSTOR
152 .El
153 .Sh ENVIRONMENT
154 The following environment variables affect the execution of
155 .Nm :
156 .Bl -tag -width ".Ev GEOM_LIBRARY_PATH"
157 .It Ev GEOM_LIBRARY_PATH
158 Specifies the path where shared libraries are stored instead of
159 .Pa /lib/geom/ .
160 Multiple paths can be specified with a colon-separated list of paths.
161 .El
162 .Sh EXIT STATUS
163 Exit status is 0 on success, and 1 if the command fails.
164 .Sh EXAMPLES
165 The following example shows how to set up a stripe on three disks for automatic
166 configuration:
167 .Bd -literal -offset indent
168 geom stripe label -v -s 65536 data /dev/da0 /dev/da1 /dev/da2
169 or:
170 gstripe label -v -s 65536 data /dev/da0 /dev/da1 /dev/da2
171 .Ed
172 .Pp
173 Print the list of all providers from the DISK class:
174 .Bd -literal -offset indent
175 geom disk list
176 .Ed
177 .Pp
178 Unload a kernel module which implements the MD class:
179 .Bd -literal -offset indent
180 geom md unload
181 .Ed
182 .Sh SEE ALSO
183 .Xr libgeom 3 ,
184 .Xr geom 4 ,
185 .Xr gcache 8 ,
186 .Xr gconcat 8 ,
187 .Xr geli 8 ,
188 .Xr gjournal 8 ,
189 .Xr glabel 8 ,
190 .Xr gmirror 8 ,
191 .Xr gmountver 8 ,
192 .Xr gmultipath 8 ,
193 .Xr gnop 8 ,
194 .Xr gpart 8 ,
195 .Xr graid3 8 ,
196 .Xr gsched 8 ,
197 .Xr gshsec 8 ,
198 .Xr gstripe 8 ,
199 .Xr gvirstor 8
200 .Sh HISTORY
201 The
202 .Nm
203 utility appeared in
204 .Fx 5.3 .
205 .Sh AUTHORS
206 .An Pawel Jakub Dawidek Aq pjd@FreeBSD.org