~ubuntu-branches/ubuntu/precise/autofs5/precise

« back to all changes in this revision

Viewing changes to .pc/autofs-5.0.5-use-weight-only-for-server-selection.patch/man/autofs.5

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2011-07-03 14:35:46 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110703143546-nej26krjij0rf792
Tags: 5.0.6-0ubuntu1
* New upstream release:
  - Dropped upstream patches 
  - Refreshed debian/patches/17ld.patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.\" t
2
 
.TH AUTOFS 5 "6 Apr 1998"
3
 
.TH AUTOFS 5 "14 Jan 2000"
4
 
.SH NAME
5
 
autofs \- Format of the automounter maps
6
 
.SH "DESCRIPTION"
7
 
The automounter maps are FILE, NIS, NISPLUS or LDAP maps referred to by
8
 
the master map of the automounter (see
9
 
.BR auto.master (5)).
10
 
These maps describe how file systems below the mount point of the map
11
 
(given in the master map) are to be mounted.  This page describes the
12
 
.B sun
13
 
map format; if another map format is specified (e.g. \fBhesiod\fP),
14
 
this documentation does not apply.
15
 
 
16
 
Indirect maps can be changed on the fly and the automouter will recognize
17
 
those changes on the next operation it performs on that map. Direct maps
18
 
require a HUP signal be sent to the daemon to refresh their contents as does
19
 
the master map.
20
 
.SH "FORMAT"
21
 
This is a description of the text file format.  Other methods of specifying
22
 
these files may exist.  All empty lines or lines beginning with # are
23
 
ignored. The basic format of one line in such maps is:
24
 
.P
25
 
.BI "key [" -options "] location"
26
 
 
27
 
.SS key
28
 
For indirect mounts this is the part of the path name between the mount point
29
 
and the path into the filesystem when it is mounted. Usually you can think about the
30
 
key as a sub-directory name below the autofs managed mount point.
31
 
 
32
 
For direct mounts this is the full path of each mount point. This map is always
33
 
associated with the /- mount point in the master map. 
34
 
 
35
 
.SS options
36
 
Zero or more options may be given.  Options can also be given in the 
37
 
.B auto.master
38
 
file in which case both values are cumulative (this is a difference
39
 
from SunOS).  The options are a list of comma separated options as
40
 
customary for the
41
 
.BR mount (8)
42
 
command. There are two special options
43
 
.I -fstype=
44
 
used to specify a filesystem type if the filesystem is not of the default
45
 
NFS type.  This option is processed by the automounter and not by the mount
46
 
command.
47
 
.I -strict
48
 
is used to treat errors when mounting file systems as fatal. This is important when
49
 
multiple file systems should be mounted (`multi-mounts'). If this option
50
 
is given, no file system is mounted at all if at least one file system
51
 
can't be mounted.
52
 
 
53
 
.SS location
54
 
The location specifies from where the file system is to be mounted.  In the
55
 
most cases this will be an NFS volume and the usual notation
56
 
.I host:pathname
57
 
is used to indicate the remote filesystem and path to be mounted.  If
58
 
the filesystem to be mounted begins with a / (such as local
59
 
.I /dev
60
 
entries or smbfs shares) a : needs to be prefixed (e.g. 
61
 
.IR :/dev/sda1 ).
62
 
.SH EXAMPLE
63
 
Indirect map:
64
 
.sp
65
 
.RS +.2i
66
 
.ta 1.0i 3.0i
67
 
.nf
68
 
kernel  -ro,soft,intr   ftp.kernel.org:/pub/linux
69
 
boot    -fstype=ext2    :/dev/hda1
70
 
windoze -fstype=smbfs   ://windoze/c
71
 
removable       -fstype=ext2    :/dev/hdd
72
 
cd      -fstype=iso9660,ro      :/dev/hdc
73
 
floppy  -fstype=auto    :/dev/fd0
74
 
server  -rw,hard,intr   / -ro myserver.me.org:/ \\
75
 
                        /usr myserver.me.org:/usr \\
76
 
                        /home myserver.me.org:/home
77
 
.fi
78
 
.RE
79
 
.sp
80
 
In the first line we have a NFS remote mount of the kernel directory on
81
 
.IR ftp.kernel.org .
82
 
This is mounted read-only.  The second line mounts an ext2 volume from a
83
 
local ide drive.  The third makes a share exported from a Windows
84
 
machine available for automounting.  The rest should be fairly
85
 
self-explanatory. The last entry (the last three lines) is an example
86
 
of a multi-map (see below).
87
 
 
88
 
If you use the automounter for a filesystem without access permissions
89
 
(like \fBvfat\fP), users usually can't write on such a filesystem
90
 
because it is mounted as user \fBroot\fP.
91
 
You can solve this problem by passing the option \fIgid=<gid>\fP,
92
 
e.g. \fIgid=floppy\fP. The filesystem is then mounted as group
93
 
\fBfloppy\fP instead of \fBroot\fP. Then you can add the users
94
 
to this group, and they can write to the filesystem. Here's an
95
 
example entry for an autofs map:
96
 
.sp
97
 
.RS +.2i
98
 
.ta 1.0i 3.0i
99
 
.nf
100
 
floppy-vfat  -fstype=vfat,sync,gid=floppy,umask=002  :/dev/fd0
101
 
.fi
102
 
.RE
103
 
.sp
104
 
Direct map:
105
 
.sp
106
 
.RS +.2i
107
 
.ta 1.0i 3.0i
108
 
.nf
109
 
/nfs/apps/mozilla       bogus:/usr/local/moxill
110
 
/nfs/data/budgets       tiger:/usr/local/budgets
111
 
/tst/sbin               bogus:/usr/sbin
112
 
.fi
113
 
.RE
114
 
.sp
115
 
.SH FEATURES
116
 
.SS Map Key Substitution
117
 
An & character in the
118
 
.B location
119
 
is expanded to the value of the 
120
 
.B key
121
 
field that matched the line (which probably only makes sense together with
122
 
a wildcard key).
123
 
.SS Wildcard Key
124
 
A map key of * denotes a wild-card entry. This entry is consulted
125
 
if the specified key does not exist in the map.  A typical wild-card
126
 
entry looks like this:
127
 
.sp
128
 
.RS +.2i
129
 
.ta 1.0i
130
 
.nf
131
 
*       server:/export/home/&
132
 
.fi
133
 
.RE
134
 
.sp
135
 
The special character '&' will be replaced by the provided key.  So,
136
 
in the example above, a lookup for the key 'foo' would yield a mount
137
 
of server:/export/home/foo.
138
 
.SS Variable Substitution
139
 
The following special variables will be substituted in the key and location
140
 
fields of an automounter map if prefixed with $ as customary from shell
141
 
scripts (Curly braces can be used to separate the field name):
142
 
.sp
143
 
.RS +.2i
144
 
.ta 1.5i
145
 
.nf
146
 
ARCH    Architecture (uname -m)
147
 
CPU     Processor Type
148
 
HOST    Hostname (uname -n)
149
 
OSNAME  Operating System (uname -s)
150
 
OSREL   Release of OS (uname -r)
151
 
OSVERS  Version of OS (uname -v)
152
 
.fi
153
 
.RE
154
 
.sp
155
 
autofs provides additional variables that are set based on the
156
 
user requesting the mount:
157
 
.sp 
158
 
.RS +.2i
159
 
.ta 1.5i
160
 
.nf
161
 
USER    The user login name
162
 
UID     The user login ID
163
 
GROUP   The user group name
164
 
GID     The user group ID
165
 
HOME    The user home directory
166
 
HOST    Hostname (uname -n)
167
 
.fi
168
 
.RE
169
 
.sp
170
 
Additional entries can be defined with the -Dvariable=Value map-option to
171
 
.BR automount (8).
172
 
.SS Executable Maps
173
 
A map can be marked as executable. A
174
 
.B program
175
 
map will be called with the key as an argument.  It may
176
 
return no lines of output if there's an error, or one or more lines
177
 
containing a map entry (with \\ quoting line breaks). The map entry
178
 
corresponds to what would normally follow a map key.
179
 
.P
180
 
An executable map can return an error code to indicate the failure in addition
181
 
to no output at all.  All output sent to stderr is logged into the system
182
 
logs.
183
 
.SS Multiple Mounts
184
 
A
185
 
.B multi-mount map
186
 
can be used to name multiple filesystems to mount.  It takes the form:
187
 
.sp
188
 
.RS +.2i
189
 
.ta 1.0i
190
 
.nf
191
 
.BI "key [" -options "] [mount-point [" -options "] location...]..."
192
 
.fi
193
 
.RE
194
 
.sp
195
 
.P
196
 
This may extend over multiple lines, quoting the line-breaks with \`\\\'.
197
 
If present, the per-mountpoint mount-options are appended to the
198
 
default mount-options.
199
 
.SS Replicated Server
200
 
.sp
201
 
.RS +.2i
202
 
.ta 1.5i
203
 
.nf
204
 
Multiple replicated hosts, same path:
205
 
<path> host1,host2,hostn:/path/path
206
 
 
207
 
Multiple hosts, some with same path, some with another
208
 
<path> host1,host2:/blah host3:/some/other/path
209
 
 
210
 
Multiple replicated hosts, different (potentially) paths:
211
 
<path> host1:/path/pathA host2:/path/pathB
212
 
 
213
 
Mutliple weighted, replicated hosts same path:
214
 
<path> host1(5),host2(6),host3(1):/path/path
215
 
 
216
 
Multiple weighted, replicated hosts different (potentially) paths:
217
 
<path> host1(3):/path/pathA host2(5):/path/pathB
218
 
 
219
 
Anything else is questionable and unsupported, but these variations will also work:
220
 
<path> host1(3),host:/blah
221
 
.fi
222
 
.RE
223
 
.sp
224
 
.SH UNSUPPORTED
225
 
This version of the automounter supports direct maps stored in FILE, NIS, NISPLUS
226
 
and LDAP only.
227
 
.SH "SEE ALSO"
228
 
.BR automount (8),
229
 
.BR auto.master (5),
230
 
.BR autofs (8),
231
 
.BR mount (8).
232
 
.BR autofs_ldap_auth.conf (5)
233
 
.SH AUTHOR
234
 
This manual page was written by Christoph Lameter <chris@waterf.org>,
235
 
for the Debian GNU/Linux system.  Edited by H. Peter Avian
236
 
<hpa@transmeta.com>, Jeremy Fitzhardinge <jeremy@goop.org> and
237
 
Ian Kent <raven@themaw.net>.