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