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