1 .\" Copyright (c) 2004-2005 Pawel Jakub Dawidek <pjd@FreeBSD.org>
2 .\" Copyright (c) 2008-2009 Ivan Voras <ivoras@FreeBSD.org>
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 .Nd "disk labelization control utility"
71 utility is used for GEOM provider labelization.
72 A label can be set up on a GEOM provider in two ways:
78 method, no metadata are stored on the devices, so a label has to be configured
79 by hand every time it is needed.
82 method uses on-disk metadata to store the label and detect it automatically in
85 This class also provides volume label detection for file systems.
86 Those labels cannot be set with
88 but must be set with the appropriate file system utility, e.g.\& for UFS
89 the file system label is set with
91 Currently supported file systems are:
93 .Bl -bullet -offset indent -compact
95 UFS1 volume names (directory
98 UFS2 volume names (directory
101 UFS1 file system IDs (directory
104 UFS2 file system IDs (directory
107 MSDOSFS (FAT12, FAT16, FAT32) (directory
108 .Pa /dev/msdosfs/ ) .
110 CD ISO9660 (directory
111 .Pa /dev/iso9660/ ) .
117 .Pa /dev/reiserfs/ ) .
123 Support for partition metadata is implemented for:
125 .Bl -bullet -offset indent -compact
127 GPT labels (directory
134 Generic labels are created in the directory
137 The first argument to
139 indicates an action to be performed:
140 .Bl -tag -width ".Cm destroy"
142 Create temporary label
144 for the given provider.
150 will be loaded if it is not loaded already.
154 for the given provider.
157 method, where metadata is stored in a provider's last sector.
160 will be loaded if it is not loaded already.
162 Turn off the given label by its
164 This command does not touch on-disk metadata!
169 Clear metadata on the given devices.
171 Dump metadata stored on the given devices.
187 .Bl -tag -width indent
189 Force the removal of the specified labels.
196 variables can be used to control the behavior of the
199 The default value is shown next to each variable.
200 .Bl -tag -width indent
201 .It Va kern.geom.label.debug : No 0
205 This can be set to a number between 0 and 2 inclusive.
206 If set to 0 minimal debug information is printed, and if set to 2 the
207 maximum amount of debug information is printed.
210 Exit status is 0 on success, and 1 if the command fails.
212 The following example shows how to set up a label for disk
214 create a file system on it, and mount it:
215 .Bd -literal -offset indent
216 glabel label -v usr /dev/da2
218 mount /dev/label/usr /usr
225 The next example shows how to set up a label for a UFS file system:
226 .Bd -literal -offset indent
227 tunefs -L data /dev/da4s1a
228 mount /dev/ufs/data /mnt/data
245 .An Pawel Jakub Dawidek Aq pjd@FreeBSD.org