geom.8 (b3f9d8c804bde2bf1199a558a06b81c434fb47df) geom.8 (3e64260d81c7cc2a2b2f3eaab01c9ed4d6a225d3)
1.\" Copyright (c) 2004-2005 Pawel Jakub Dawidek <pjd@FreeBSD.org>
1.\" Copyright (c) 2004 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

--- 9 unchanged lines hidden (view full) ---

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.\"
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

--- 9 unchanged lines hidden (view full) ---

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