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 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 36.Ar command 37.Op Ar options 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 45which can be used for existing 46.Xr geom 8 47unaware classes. 48Here is the list of standard commands: 49.Bl -tag -width ".Cm status" 50.It Cm help 51List all available commands for the given class. 52.It Cm list 53Print detailed information (within the given class) about all geoms 54(if no additional arguments were specified) or the given geoms. 55This command is only available if the given class exists in the kernel. 56.It Cm status 57Print general information (within the given class) about all geoms 58(if no additional arguments were specified) or the given geoms. 59This command is only available if the given class exists in the kernel. 60.Pp 61Additional options include: 62.Bl -tag -width ".Fl s" 63.It Fl s 64Produce script-friendly output. 65.El 66.It Cm load 67Load the kernel module that implements the given class. 68This command is only available if the class does not yet exist in the kernel and 69the file 70.Pa geom_ Ns Ao Ar class Ac Ns Pa .ko 71can be found in one of the directories specifed in 72.Va kern.module_path 73sysctl. 74.It Cm unload 75Unload the kernel module which implements the given class. 76This command is only available if the given class is loaded as a 77kernel module. 78.El 79.Pp 80Class-specific commands are implemented as shared libraries which 81are stored in 82.Pa /lib/geom/ 83directory and are loaded via 84.Xr dlopen 3 85function when the class name is known. 86When a class-specific shared library exists, a direct utility should also be 87available under the name of 88.Nm g Ns Ar class . 89.Pp 90Currently available classes which are aware of 91.Xr geom 8 : 92.Pp 93.Bl -bullet -offset indent -compact 94.It 95CONCAT 96.It 97LABEL 98.It 99MIRROR 100.It 101NOP 102.It 103RAID3 104.It 105SHSEC 106.It 107STRIPE 108.El 109.Sh ENVIRONMENT 110The following environment variables affect the execution of 111.Nm : 112.Bl -tag -width ".Ev GEOM_LIBRARY_PATH" 113.It Ev GEOM_LIBRARY_PATH 114Specifies the path where shared libraries are stored instead of 115.Pa /lib/geom/ . 116.El 117.Sh EXIT STATUS 118Exit status is 0 on success, and 1 if the command fails. 119.Sh EXAMPLES 120The following example shows how to set up a stripe on three disks for automatic 121configuration: 122.Bd -literal -offset indent 123geom stripe label -v -s 65536 data /dev/da0 /dev/da1 /dev/da2 124or: 125gstripe label -v -s 65536 data /dev/da0 /dev/da1 /dev/da2 126.Ed 127.Pp 128Print the list of all providers from the DISK class: 129.Bd -literal -offset indent 130geom disk list 131.Ed 132.Pp 133Unload a kernel module which implements the MD class: 134.Bd -literal -offset indent 135geom md unload 136.Ed 137.Sh SEE ALSO 138.Xr geom 4 , 139.Xr gconcat 8 , 140.Xr glabel 8 , 141.Xr gmirror 8 , 142.Xr gnop 8 , 143.Xr graid3 8 , 144.Xr gshsec 8 , 145.Xr gstripe 8 146.Sh HISTORY 147The 148.Nm 149utility appeared in 150.Fx 5.3 . 151.Sh AUTHORS 152.An Pawel Jakub Dawidek Aq pjd@FreeBSD.org 153