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