1 .\" Copyright (c) 2004-2005 Pawel Jakub Dawidek <pjd@FreeBSD.org>
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
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.
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
32 .Nd "disk labelization control utility"
70 utility is used for GEOM provider labelization.
71 A label can be set up on a GEOM provider in two ways:
77 method, no metadata are stored on the devices, so a label has to be configured
78 by hand every time it is needed.
81 method uses on-disk metadata to store the label and detect it automatically in
84 This class also provides volume label detection for file systems.
85 Those labels cannot be set with
87 but must be set with the appropriate file system utility, e.g.\& for UFS
88 the file system label is set with
90 Currently supported file systems are:
92 .Bl -bullet -offset indent -compact
94 UFS1 volume names (directory
97 UFS2 volume names (directory
100 UFS1 file system IDs (directory
103 UFS2 file system IDs (directory
106 MSDOSFS (FAT12, FAT16, FAT32) (directory
107 .Pa /dev/msdosfs/ ) .
109 CD ISO9660 (directory
110 .Pa /dev/iso9660/ ) .
116 .Pa /dev/reiserfs/ ) .
122 Non file-system labels are created in the directory
125 The first argument to
127 indicates an action to be performed:
128 .Bl -tag -width ".Cm destroy"
130 Create temporary label
132 for the given provider.
138 will be loaded if it is not loaded already.
142 for the given provider.
145 method, where metadata is stored in a provider's last sector.
148 will be loaded if it is not loaded already.
150 Turn off the given label by its
152 This command does not touch on-disk metadata!
157 Clear metadata on the given devices.
159 Dump metadata stored on the given devices.
175 .Bl -tag -width indent
177 Force the removal of the specified labels.
184 variables can be used to control the behavior of the
187 The default value is shown next to each variable.
188 .Bl -tag -width indent
189 .It Va kern.geom.label.debug : No 0
193 This can be set to a number between 0 and 2 inclusive.
194 If set to 0 minimal debug information is printed, and if set to 2 the
195 maximum amount of debug information is printed.
198 Exit status is 0 on success, and 1 if the command fails.
200 The following example shows how to set up a label for disk
202 create a file system on it, and mount it:
203 .Bd -literal -offset indent
204 glabel label -v usr /dev/da2
206 mount /dev/label/usr /usr
213 The next example shows how to set up a label for a UFS file system:
214 .Bd -literal -offset indent
215 tunefs -L data /dev/da4s1a
216 mount /dev/ufs/data /mnt/data
233 .An Pawel Jakub Dawidek Aq pjd@FreeBSD.org