xref: /freebsd/sbin/geom/core/geom.8 (revision 0f73f7016baa6015b1b0b582033af2f1c7760af5)
185e9dc7dSPawel Jakub Dawidek.\" Copyright (c) 2004-2005 Pawel Jakub Dawidek <pjd@FreeBSD.org>
23e64260dSPawel Jakub Dawidek.\" All rights reserved.
33e64260dSPawel Jakub Dawidek.\"
43e64260dSPawel Jakub Dawidek.\" Redistribution and use in source and binary forms, with or without
53e64260dSPawel Jakub Dawidek.\" modification, are permitted provided that the following conditions
63e64260dSPawel Jakub Dawidek.\" are met:
73e64260dSPawel Jakub Dawidek.\" 1. Redistributions of source code must retain the above copyright
83e64260dSPawel Jakub Dawidek.\"    notice, this list of conditions and the following disclaimer.
93e64260dSPawel Jakub Dawidek.\" 2. Redistributions in binary form must reproduce the above copyright
103e64260dSPawel Jakub Dawidek.\"    notice, this list of conditions and the following disclaimer in the
113e64260dSPawel Jakub Dawidek.\"    documentation and/or other materials provided with the distribution.
123e64260dSPawel Jakub Dawidek.\"
133e64260dSPawel Jakub Dawidek.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
143e64260dSPawel Jakub Dawidek.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
153e64260dSPawel Jakub Dawidek.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
163e64260dSPawel Jakub Dawidek.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
173e64260dSPawel Jakub Dawidek.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
183e64260dSPawel Jakub Dawidek.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
193e64260dSPawel Jakub Dawidek.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
203e64260dSPawel Jakub Dawidek.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
213e64260dSPawel Jakub Dawidek.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
223e64260dSPawel Jakub Dawidek.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
233e64260dSPawel Jakub Dawidek.\" SUCH DAMAGE.
243e64260dSPawel Jakub Dawidek.\"
253e64260dSPawel Jakub Dawidek.\" $FreeBSD$
263e64260dSPawel Jakub Dawidek.\"
27*0f73f701SEdward Tomasz Napierala.Dd September 13, 2018
283e64260dSPawel Jakub Dawidek.Dt GEOM 8
293e64260dSPawel Jakub Dawidek.Os
303e64260dSPawel Jakub Dawidek.Sh NAME
313e64260dSPawel Jakub Dawidek.Nm geom
323e64260dSPawel Jakub Dawidek.Nd "universal control utility for GEOM classes"
333e64260dSPawel Jakub Dawidek.Sh SYNOPSIS
343e64260dSPawel Jakub Dawidek.Nm
353e64260dSPawel Jakub Dawidek.Ar class
36adc8d20dSPawel Jakub Dawidek.Cm help
37adc8d20dSPawel Jakub Dawidek.Nm
38adc8d20dSPawel Jakub Dawidek.Ar class
39adc8d20dSPawel Jakub Dawidek.Cm list
4083d165c1SAlexander Motin.Op Fl a
41adc8d20dSPawel Jakub Dawidek.Op Ar name ...
42adc8d20dSPawel Jakub Dawidek.Nm
43adc8d20dSPawel Jakub Dawidek.Ar class
44adc8d20dSPawel Jakub Dawidek.Cm status
4583d165c1SAlexander Motin.Op Fl ags
46adc8d20dSPawel Jakub Dawidek.Op Ar name ...
47adc8d20dSPawel Jakub Dawidek.Nm
48adc8d20dSPawel Jakub Dawidek.Ar class
49adc8d20dSPawel Jakub Dawidek.Cm load
50adc8d20dSPawel Jakub Dawidek.Op Fl v
51adc8d20dSPawel Jakub Dawidek.Nm
52adc8d20dSPawel Jakub Dawidek.Ar class
53adc8d20dSPawel Jakub Dawidek.Cm unload
54adc8d20dSPawel Jakub Dawidek.Op Fl v
55*0f73f701SEdward Tomasz Napierala.Nm
56*0f73f701SEdward Tomasz Napierala.Fl p
57*0f73f701SEdward Tomasz Napierala.Ar provider-name
583e64260dSPawel Jakub Dawidek.Sh DESCRIPTION
593e64260dSPawel Jakub DawidekThe
603e64260dSPawel Jakub Dawidek.Nm
613e64260dSPawel Jakub Dawidekutility is used to control various GEOM classes.
623e64260dSPawel Jakub DawidekA class has to be aware of
633e64260dSPawel Jakub Dawidek.Xr geom 8
64f6ac2391SJoel Dahlcommunication methods, but there are also some standard commands
65d608b5abSCeri Davieswhich can be used for existing
663e64260dSPawel Jakub Dawidek.Xr geom 8
67d608b5abSCeri Daviesunaware classes.
683e64260dSPawel Jakub DawidekHere is the list of standard commands:
6985e9dc7dSPawel Jakub Dawidek.Bl -tag -width ".Cm status"
703e64260dSPawel Jakub Dawidek.It Cm help
713e64260dSPawel Jakub DawidekList all available commands for the given class.
723e64260dSPawel Jakub Dawidek.It Cm list
731d723f1dSPawel Jakub DawidekPrint detailed information (within the given class) about all geoms
741d723f1dSPawel Jakub Dawidek(if no additional arguments were specified) or the given geoms.
753e64260dSPawel Jakub DawidekThis command is only available if the given class exists in the kernel.
7683d165c1SAlexander MotinAdditional options include:
7783d165c1SAlexander Motin.Bl -tag -width ".Fl a"
7883d165c1SAlexander Motin.It Fl a
7983d165c1SAlexander MotinPrint information for geoms without providers.
8083d165c1SAlexander Motin.El
8185e9dc7dSPawel Jakub Dawidek.It Cm status
8285e9dc7dSPawel Jakub DawidekPrint general information (within the given class) about all geoms
8385e9dc7dSPawel Jakub Dawidek(if no additional arguments were specified) or the given geoms.
8485e9dc7dSPawel Jakub DawidekThis command is only available if the given class exists in the kernel.
85ccc0c897SPawel Jakub Dawidek.Pp
86ccc0c897SPawel Jakub DawidekAdditional options include:
87ccc0c897SPawel Jakub Dawidek.Bl -tag -width ".Fl s"
8883d165c1SAlexander Motin.It Fl a
8983d165c1SAlexander MotinWhen used with -g, print status for geoms without providers.
9083d165c1SAlexander Motin.It Fl g
9183d165c1SAlexander MotinReport statuses for geoms instead of providers.
92ccc0c897SPawel Jakub Dawidek.It Fl s
93ccc0c897SPawel Jakub DawidekProduce script-friendly output.
94ccc0c897SPawel Jakub Dawidek.El
953e64260dSPawel Jakub Dawidek.It Cm load
963e64260dSPawel Jakub DawidekLoad the kernel module that implements the given class.
970e252c9aSRuslan ErmilovThis command is only available if the class does not yet exist in the kernel and
983e64260dSPawel Jakub Dawidekthe file
990e252c9aSRuslan Ermilov.Pa geom_ Ns Ao Ar class Ac Ns Pa .ko
100c2025a76SJoel Dahlcan be found in one of the directories specified in
1013e64260dSPawel Jakub Dawidek.Va kern.module_path
1023e64260dSPawel Jakub Dawideksysctl.
1033e64260dSPawel Jakub Dawidek.It Cm unload
1043e64260dSPawel Jakub DawidekUnload the kernel module which implements the given class.
1053e64260dSPawel Jakub DawidekThis command is only available if the given class is loaded as a
1063e64260dSPawel Jakub Dawidekkernel module.
1073e64260dSPawel Jakub Dawidek.El
1083e64260dSPawel Jakub Dawidek.Pp
109*0f73f701SEdward Tomasz NapieralaAdditional options include:
110*0f73f701SEdward Tomasz Napierala.Bl -tag -width ".Cm status"
111*0f73f701SEdward Tomasz Napierala.It Fl p Ar provider-name
112*0f73f701SEdward Tomasz NapieralaPrint detailed information about the geom which provides
113*0f73f701SEdward Tomasz Napierala.Ar provider-name .
114*0f73f701SEdward Tomasz Napierala.El
115*0f73f701SEdward Tomasz Napierala.Pp
1163e64260dSPawel Jakub DawidekClass-specific commands are implemented as shared libraries which
1173e64260dSPawel Jakub Dawidekare stored in
1183e64260dSPawel Jakub Dawidek.Pa /lib/geom/
1193e64260dSPawel Jakub Dawidekdirectory and are loaded via
1203e64260dSPawel Jakub Dawidek.Xr dlopen 3
1213e64260dSPawel Jakub Dawidekfunction when the class name is known.
1223e64260dSPawel Jakub DawidekWhen a class-specific shared library exists, a direct utility should also be
1233e64260dSPawel Jakub Dawidekavailable under the name of
1240e252c9aSRuslan Ermilov.Nm g Ns Ar class .
1253e64260dSPawel Jakub Dawidek.Pp
1263e64260dSPawel Jakub DawidekCurrently available classes which are aware of
1273e64260dSPawel Jakub Dawidek.Xr geom 8 :
1280e252c9aSRuslan Ermilov.Pp
1293e64260dSPawel Jakub Dawidek.Bl -bullet -offset indent -compact
1303e64260dSPawel Jakub Dawidek.It
131081632cfSPawel Jakub DawidekCACHE
132081632cfSPawel Jakub Dawidek.It
1333e64260dSPawel Jakub DawidekCONCAT
1343e64260dSPawel Jakub Dawidek.It
135343c20a8SPawel Jakub DawidekELI
136343c20a8SPawel Jakub Dawidek.It
137081632cfSPawel Jakub DawidekJOURNAL
138081632cfSPawel Jakub Dawidek.It
139b3530b8eSPawel Jakub DawidekLABEL
140b3530b8eSPawel Jakub Dawidek.It
141b3530b8eSPawel Jakub DawidekMIRROR
142b3530b8eSPawel Jakub Dawidek.It
14328887567SMaxim KonovalovMOUNTVER
14428887567SMaxim Konovalov.It
145081632cfSPawel Jakub DawidekMULTIPATH
146081632cfSPawel Jakub Dawidek.It
1473e64260dSPawel Jakub DawidekNOP
1483e64260dSPawel Jakub Dawidek.It
149081632cfSPawel Jakub DawidekPART
150081632cfSPawel Jakub Dawidek.It
15183d165c1SAlexander MotinRAID
15283d165c1SAlexander Motin.It
153b3530b8eSPawel Jakub DawidekRAID3
154b3530b8eSPawel Jakub Dawidek.It
15528887567SMaxim KonovalovSCHED
15628887567SMaxim Konovalov.It
157f7118698SPawel Jakub DawidekSHSEC
158f7118698SPawel Jakub Dawidek.It
1593e64260dSPawel Jakub DawidekSTRIPE
160f854db0bSPawel Jakub Dawidek.It
161f854db0bSPawel Jakub DawidekVIRSTOR
1623e64260dSPawel Jakub Dawidek.El
1633bad06e9SPawel Jakub Dawidek.Sh ENVIRONMENT
1643bad06e9SPawel Jakub DawidekThe following environment variables affect the execution of
1653bad06e9SPawel Jakub Dawidek.Nm :
1663bad06e9SPawel Jakub Dawidek.Bl -tag -width ".Ev GEOM_LIBRARY_PATH"
1673bad06e9SPawel Jakub Dawidek.It Ev GEOM_LIBRARY_PATH
1683bad06e9SPawel Jakub DawidekSpecifies the path where shared libraries are stored instead of
1693bad06e9SPawel Jakub Dawidek.Pa /lib/geom/ .
1709d193848SUlf LilleengenMultiple paths can be specified with a colon-separated list of paths.
1713bad06e9SPawel Jakub Dawidek.El
1726087df9eSRuslan Ermilov.Sh EXIT STATUS
1736087df9eSRuslan ErmilovExit status is 0 on success, and 1 if the command fails.
1743e64260dSPawel Jakub Dawidek.Sh EXAMPLES
1753e64260dSPawel Jakub DawidekThe following example shows how to set up a stripe on three disks for automatic
1763e64260dSPawel Jakub Dawidekconfiguration:
1773e64260dSPawel Jakub Dawidek.Bd -literal -offset indent
1783e64260dSPawel Jakub Dawidekgeom stripe label -v -s 65536 data /dev/da0 /dev/da1 /dev/da2
1793e64260dSPawel Jakub Dawidekor:
1803e64260dSPawel Jakub Dawidekgstripe label -v -s 65536 data /dev/da0 /dev/da1 /dev/da2
1813e64260dSPawel Jakub Dawidek.Ed
1823e64260dSPawel Jakub Dawidek.Pp
1833e64260dSPawel Jakub DawidekPrint the list of all providers from the DISK class:
1843e64260dSPawel Jakub Dawidek.Bd -literal -offset indent
1853e64260dSPawel Jakub Dawidekgeom disk list
1863e64260dSPawel Jakub Dawidek.Ed
1873e64260dSPawel Jakub Dawidek.Pp
1883e64260dSPawel Jakub DawidekUnload a kernel module which implements the MD class:
1893e64260dSPawel Jakub Dawidek.Bd -literal -offset indent
1903e64260dSPawel Jakub Dawidekgeom md unload
1913e64260dSPawel Jakub Dawidek.Ed
1923e64260dSPawel Jakub Dawidek.Sh SEE ALSO
193a7c13cccSEdward Tomasz Napierala.Xr libgeom 3 ,
1943e64260dSPawel Jakub Dawidek.Xr geom 4 ,
195cf7710e1SEdward Tomasz Napierala.Xr gcache 8 ,
1963e64260dSPawel Jakub Dawidek.Xr gconcat 8 ,
197343c20a8SPawel Jakub Dawidek.Xr geli 8 ,
198081632cfSPawel Jakub Dawidek.Xr gjournal 8 ,
199b03d3309SPawel Jakub Dawidek.Xr glabel 8 ,
2000fe2ba03SPawel Jakub Dawidek.Xr gmirror 8 ,
201b3f9d8c8SEdward Tomasz Napierala.Xr gmountver 8 ,
202081632cfSPawel Jakub Dawidek.Xr gmultipath 8 ,
2033e64260dSPawel Jakub Dawidek.Xr gnop 8 ,
204081632cfSPawel Jakub Dawidek.Xr gpart 8 ,
205925fa96bSPawel Jakub Dawidek.Xr graid3 8 ,
20628887567SMaxim Konovalov.Xr gsched 8 ,
2074a06539fSPawel Jakub Dawidek.Xr gshsec 8 ,
208f854db0bSPawel Jakub Dawidek.Xr gstripe 8 ,
209f854db0bSPawel Jakub Dawidek.Xr gvirstor 8
2103e64260dSPawel Jakub Dawidek.Sh HISTORY
2113e64260dSPawel Jakub DawidekThe
2123e64260dSPawel Jakub Dawidek.Nm
2133e64260dSPawel Jakub Dawidekutility appeared in
2143e64260dSPawel Jakub Dawidek.Fx 5.3 .
2153e64260dSPawel Jakub Dawidek.Sh AUTHORS
216bd0891ceSBaptiste Daroussin.An Pawel Jakub Dawidek Aq Mt pjd@FreeBSD.org
217