xref: /dragonfly/share/man/man5/devtab.5 (revision 548a3528)
1.\"
2.\" Copyright (c) 2009
3.\"	The DragonFly Project.  All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\"
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in
13.\"    the documentation and/or other materials provided with the
14.\"    distribution.
15.\" 3. Neither the name of The DragonFly Project nor the names of its
16.\"    contributors may be used to endorse or promote products derived
17.\"    from this software without specific, prior written permission.
18.\"
19.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
22.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
23.\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24.\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
25.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
27.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
29.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.Dd September 13, 2009
33.Dt DEVTAB 5
34.Os
35.Sh NAME
36.Nm devtab
37.Nd label conversion file for device paths
38.Sh DESCRIPTION
39The
40.Nm
41file contains label conversions for
42.Xr fstab 5 ,
43.Xr mount 8 ,
44.Xr hammer 8 ,
45and other commands which expect device paths.
46It is typically used to translate longer serial numbers (which
47.Xr devfs 5
48automatically creates as
49.Pa /dev/serno/<serial>[.suffix] )
50into short form names.
51.Pp
52.Nm
53is only read by programs, and not written;
54it is the duty of the system administrator to properly create
55and maintain this file.
56Each conversion is described on a separate line;
57fields on each line are separated by tabs or spaces.
58.Pp
59The first field specifies the conversion's label.
60.Pp
61The second field is the conversion's type.
62Valid types are
63.Bl -tag -width ".Sy serno" -offset indent
64.It Sy serno
65Translates to
66.Pa /dev/serno
67.It Sy path
68Translates to the path as specified
69.El
70.Pp
71The third field specifies the conversion's base path
72.Sh FILES
73.Bl -tag -width ".Pa /etc/devtab" -compact
74.It Pa /etc/devtab
75The
76.Nm
77file resides in
78.Pa /etc .
79.El
80.Sh EXAMPLES
81This will translate references like
82.Sy fubar ,
83.Sy fubar.s1a
84etc.\& to their
85.Pa /dev/serno/L123456
86counterparts:
87.Pp
88.Dl "fubar        serno        L123456"
89.Pp
90This will translate references like
91.Sy fubar ,
92.Sy fubar.s1a
93etc.\& to their
94.Pa /full/path
95counterparts:
96.Pp
97.Dl "fubar        path         /full/path"
98.Sh SEE ALSO
99.Xr getdevpath 3 ,
100.Xr fstab 5 ,
101.Xr hammer 8 ,
102.Xr mount 8
103.Sh HISTORY
104The
105.Nm
106file format appeared in
107.Dx 2.3 .
108