Deleted Added
full compact
glabel.8 (143576) glabel.8 (148978)
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.\"
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: head/sbin/geom/class/label/glabel.8 143576 2005-03-14 13:14:04Z pjd $
25.\" $FreeBSD: head/sbin/geom/class/label/glabel.8 148978 2005-08-12 00:27:45Z pjd $
26.\"
27.Dd July 2, 2004
28.Dt GLABEL 8
29.Os
30.Sh NAME
31.Nm glabel
32.Nd "disk labelization control utility"
33.Sh SYNOPSIS
34.Nm
35.Cm create
36.Op Fl v
37.Ar name
38.Ar dev
39.Nm
40.Cm destroy
41.Op Fl fv
42.Ar name ...
43.Nm
44.Cm label
45.Op Fl v
46.Ar name
47.Ar dev
48.Nm
49.Cm stop
50.Op Fl fv
51.Ar name ...
52.Nm
53.Cm clear
54.Op Fl v
55.Ar dev ...
56.Nm
57.Cm dump
58.Ar dev ...
59.Nm
60.Cm list
61.Nm
62.Cm status
63.Nm
64.Cm load
65.Nm
66.Cm unload
67.Sh DESCRIPTION
68The
69.Nm
70utility is used for GEOM provider labelization.
71A label can be set up on a GEOM provider in two ways:
72.Dq manual
73or
74.Dq automatic .
75When using the
76.Dq manual
77method, no metadata are stored on the devices, so a label has to be configured
78by hand every time it is needed.
79The
80.Dq automatic
81method uses on-disk metadata to store the label and detect it automatically in
82the future.
83.Pp
84This class also provides volume label detection for file systems.
85Those labels cannot be set with
86.Nm ,
87but must be set with the appropriate file system utility, e.g.\& for UFS
88the file system label is set with
89.Xr tunefs 8 .
90Currently supported file systems are:
91.Pp
92.Bl -bullet -offset indent -compact
93.It
94UFS1 (directory
95.Pa /dev/ufs/ ) .
96.It
97UFS2 (directory
98.Pa /dev/ufs/ ) .
99.It
100MSDOSFS (FAT12, FAT16, FAT32) (directory
101.Pa /dev/msdosfs/ ) .
102.It
103CD ISO9660 (directory
104.Pa /dev/iso9660/ ) .
26.\"
27.Dd July 2, 2004
28.Dt GLABEL 8
29.Os
30.Sh NAME
31.Nm glabel
32.Nd "disk labelization control utility"
33.Sh SYNOPSIS
34.Nm
35.Cm create
36.Op Fl v
37.Ar name
38.Ar dev
39.Nm
40.Cm destroy
41.Op Fl fv
42.Ar name ...
43.Nm
44.Cm label
45.Op Fl v
46.Ar name
47.Ar dev
48.Nm
49.Cm stop
50.Op Fl fv
51.Ar name ...
52.Nm
53.Cm clear
54.Op Fl v
55.Ar dev ...
56.Nm
57.Cm dump
58.Ar dev ...
59.Nm
60.Cm list
61.Nm
62.Cm status
63.Nm
64.Cm load
65.Nm
66.Cm unload
67.Sh DESCRIPTION
68The
69.Nm
70utility is used for GEOM provider labelization.
71A label can be set up on a GEOM provider in two ways:
72.Dq manual
73or
74.Dq automatic .
75When using the
76.Dq manual
77method, no metadata are stored on the devices, so a label has to be configured
78by hand every time it is needed.
79The
80.Dq automatic
81method uses on-disk metadata to store the label and detect it automatically in
82the future.
83.Pp
84This class also provides volume label detection for file systems.
85Those labels cannot be set with
86.Nm ,
87but must be set with the appropriate file system utility, e.g.\& for UFS
88the file system label is set with
89.Xr tunefs 8 .
90Currently supported file systems are:
91.Pp
92.Bl -bullet -offset indent -compact
93.It
94UFS1 (directory
95.Pa /dev/ufs/ ) .
96.It
97UFS2 (directory
98.Pa /dev/ufs/ ) .
99.It
100MSDOSFS (FAT12, FAT16, FAT32) (directory
101.Pa /dev/msdosfs/ ) .
102.It
103CD ISO9660 (directory
104.Pa /dev/iso9660/ ) .
105.It
106EXT2FS (directory
107.Pa /dev/ext2fs/ ) .
108.It
109REISERFS (directory
110.Pa /dev/reiserfs/ ) .
105.El
106.Pp
107Non file-system labels are created in the directory
108.Pa /dev/label/ .
109.Pp
110The first argument to
111.Nm
112indicates an action to be performed:
113.Bl -tag -width ".Cm destroy"
114.It Cm create
115Create temporary label
116.Ar name
117for the given provider.
118This is the
119.Dq manual
120method.
121The kernel module
122.Pa geom_label.ko
123will be loaded if it is not loaded already.
124.It Cm label
125Set up a label
126.Ar name
127for the given provider.
128This is the
129.Dq automatic
130method, where metadata is stored in a provider's last sector.
131The kernel module
132.Pa geom_label.ko
133will be loaded if it is not loaded already.
134.It Cm stop
135Turn off the given label by its
136.Ar name .
137This command does not touch on-disk metadata!
138.It Cm destroy
139Same as
140.Cm stop .
141.It Cm clear
142Clear metadata on the given devices.
143.It Cm dump
144Dump metadata stored on the given devices.
145.It Cm list
146See
147.Xr geom 8 .
148.It Cm status
149See
150.Xr geom 8 .
151.It Cm load
152See
153.Xr geom 8 .
154.It Cm unload
155See
156.Xr geom 8 .
157.El
158.Pp
159Additional options:
160.Bl -tag -width indent
161.It Fl f
162Force the removal of the specified labels.
163.It Fl v
164Be more verbose.
165.El
166.Sh SYSCTL VARIABLES
167The following
168.Xr sysctl 8
169variables can be used to control the behavior of the
170.Nm LABEL
171GEOM class.
172The default value is shown next to each variable.
173.Bl -tag -width indent
174.It Va kern.geom.label.debug : No 0
175Debug level of the
176.Nm LABEL
177GEOM class.
178This can be set to a number between 0 and 2 inclusive.
179If set to 0 minimal debug information is printed, and if set to 2 the
180maximum amount of debug information is printed.
181.El
182.Sh EXIT STATUS
183Exit status is 0 on success, and 1 if the command fails.
184.Sh EXAMPLES
185The following example shows how to set up a label for disk
186.Dq Li da2 ,
187create a file system on it, and mount it:
188.Bd -literal -offset indent
189glabel label -v usr /dev/da2
190newfs /dev/label/usr
191mount /dev/label/usr /usr
192[...]
193umount /usr
194glabel stop usr
195glabel unload
196.Ed
197.Pp
198The next example shows how to set up a label for a UFS file system:
199.Bd -literal -offset indent
200tunefs -L data /dev/da4s1a
201mount /dev/ufs/data /mnt/data
202.Ed
203.Sh SEE ALSO
204.Xr geom 4 ,
205.Xr loader.conf 5 ,
206.Xr geom 8 ,
207.Xr mount 8 ,
208.Xr newfs 8 ,
209.Xr sysctl 8 ,
210.Xr tunefs 8 ,
211.Xr umount 8
212.Sh HISTORY
213The
214.Nm
215utility appeared in
216.Fx 5.3 .
217.Sh AUTHORS
218.An Pawel Jakub Dawidek Aq pjd@FreeBSD.org
111.El
112.Pp
113Non file-system labels are created in the directory
114.Pa /dev/label/ .
115.Pp
116The first argument to
117.Nm
118indicates an action to be performed:
119.Bl -tag -width ".Cm destroy"
120.It Cm create
121Create temporary label
122.Ar name
123for the given provider.
124This is the
125.Dq manual
126method.
127The kernel module
128.Pa geom_label.ko
129will be loaded if it is not loaded already.
130.It Cm label
131Set up a label
132.Ar name
133for the given provider.
134This is the
135.Dq automatic
136method, where metadata is stored in a provider's last sector.
137The kernel module
138.Pa geom_label.ko
139will be loaded if it is not loaded already.
140.It Cm stop
141Turn off the given label by its
142.Ar name .
143This command does not touch on-disk metadata!
144.It Cm destroy
145Same as
146.Cm stop .
147.It Cm clear
148Clear metadata on the given devices.
149.It Cm dump
150Dump metadata stored on the given devices.
151.It Cm list
152See
153.Xr geom 8 .
154.It Cm status
155See
156.Xr geom 8 .
157.It Cm load
158See
159.Xr geom 8 .
160.It Cm unload
161See
162.Xr geom 8 .
163.El
164.Pp
165Additional options:
166.Bl -tag -width indent
167.It Fl f
168Force the removal of the specified labels.
169.It Fl v
170Be more verbose.
171.El
172.Sh SYSCTL VARIABLES
173The following
174.Xr sysctl 8
175variables can be used to control the behavior of the
176.Nm LABEL
177GEOM class.
178The default value is shown next to each variable.
179.Bl -tag -width indent
180.It Va kern.geom.label.debug : No 0
181Debug level of the
182.Nm LABEL
183GEOM class.
184This can be set to a number between 0 and 2 inclusive.
185If set to 0 minimal debug information is printed, and if set to 2 the
186maximum amount of debug information is printed.
187.El
188.Sh EXIT STATUS
189Exit status is 0 on success, and 1 if the command fails.
190.Sh EXAMPLES
191The following example shows how to set up a label for disk
192.Dq Li da2 ,
193create a file system on it, and mount it:
194.Bd -literal -offset indent
195glabel label -v usr /dev/da2
196newfs /dev/label/usr
197mount /dev/label/usr /usr
198[...]
199umount /usr
200glabel stop usr
201glabel unload
202.Ed
203.Pp
204The next example shows how to set up a label for a UFS file system:
205.Bd -literal -offset indent
206tunefs -L data /dev/da4s1a
207mount /dev/ufs/data /mnt/data
208.Ed
209.Sh SEE ALSO
210.Xr geom 4 ,
211.Xr loader.conf 5 ,
212.Xr geom 8 ,
213.Xr mount 8 ,
214.Xr newfs 8 ,
215.Xr sysctl 8 ,
216.Xr tunefs 8 ,
217.Xr umount 8
218.Sh HISTORY
219The
220.Nm
221utility appeared in
222.Fx 5.3 .
223.Sh AUTHORS
224.An Pawel Jakub Dawidek Aq pjd@FreeBSD.org