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"
73 utility is used for GEOM provider labelization.
74 A label can be set up on a GEOM provider in two ways:
80 method, no metadata are stored on the devices, so a label has to be configured
81 by hand every time it is needed.
84 method uses on-disk metadata to store the label and detect it automatically in
87 This GEOM class also provides volume label detection for file systems.
88 Those labels cannot be set with
90 but must be set with the appropriate file system utility, e.g.\& for UFS
91 the file system label is set with
93 Currently supported file systems are:
95 .Bl -bullet -offset indent -compact
97 UFS1 volume names (directory
100 UFS2 volume names (directory
103 UFS1 file system IDs (directory
106 UFS2 file system IDs (directory
109 MSDOSFS (FAT12, FAT16, FAT32) (directory
110 .Pa /dev/msdosfs/ ) .
112 CD ISO9660 (directory
113 .Pa /dev/iso9660/ ) .
119 .Pa /dev/reiserfs/ ) .
125 Support for partition metadata is implemented for:
127 .Bl -bullet -offset indent -compact
129 GPT labels (directory
136 Generic disk ID strings are exported as labels in the format
137 .Pa /dev/diskid/GEOM_CLASS-ident
139 .Pa /dev/diskid/DISK-6QG3Z026 .
141 Generic labels created and managed solely by
147 Note that for all label types, nested GEOM classes will cause additional
148 device nodes to be created, with context-specific data appended to their
149 names. E.g. for every node like
150 .Pa /dev/label/bigdisk
151 there will be additional entries for any partitions which the device
153 .Pa /dev/label/bigdiskp1
155 .Pa /dev/label/bigdiskp1a .
157 The first argument to
159 indicates an action to be performed:
160 .Bl -tag -width ".Cm destroy"
162 Create temporary label
164 for the given provider.
170 will be loaded if it is not loaded already.
174 for the given provider.
177 method, where metadata is stored in a provider's last sector.
180 will be loaded if it is not loaded already.
182 Turn off the given label by its
184 This command does not touch on-disk metadata!
189 Clear metadata on the given devices.
191 Dump metadata stored on the given devices.
193 Refresh / rediscover metadata from the given devices.
209 .Bl -tag -width indent
211 Force the removal of the specified labels.
218 variables can be used to control the behavior of the
221 The default value is shown next to each variable.
222 .Bl -tag -width indent
223 .It Va kern.geom.label.debug : No 0
227 This can be set to a number between 0 and 2 inclusive.
228 If set to 0 minimal debug information is printed, and if set to 2 the
229 maximum amount of debug information is printed.
231 .Bl -tag -width indent
232 .It Va kern.geom.label.*.enable : No 1
235 providers implement a
237 flag and a tunable variable named in the above format. This flag
238 controls if the label provider will be active, tasting devices
239 and creating label nodes in the
241 tree. It is sometimes desirable to disable certain label types if
242 they conflict with other classes in complex GEOM topologies.
245 Exit status is 0 on success, and 1 if the command fails.
247 The following example shows how to set up a label for disk
249 create a file system on it, and mount it:
250 .Bd -literal -offset indent
251 glabel label -v usr /dev/da2
253 mount /dev/label/usr /usr
260 The next example shows how to set up a label for a UFS file system:
261 .Bd -literal -offset indent
262 tunefs -L data /dev/da4s1a
263 mount /dev/ufs/data /mnt/data
280 .An Pawel Jakub Dawidek Aq Mt pjd@FreeBSD.org