6253 F_GETLK doesn't always return lock owner
[illumos-gate.git] / usr / src / man / man1m / rmmount.1m
blob177262f2eb6bf1c93ac4ee9579cb4b4cad778daa
1 '\" te
2 .\"  Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH RMMOUNT 1M "Mar 1, 2007"
7 .SH NAME
8 rmmount \- removable media mounter for CD-ROM, floppy, Jaz drive, and others
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fB/usr/sbin/rmmount\fR [\fB-D\fR]
13 .fi
15 .SH DESCRIPTION
16 .sp
17 .LP
18 The \fBrmmount\fR utility is a removable media mounter that is executed by
19 volume management whenever a removable medium, such as a \fBCD-ROM\fR or a
20 floppy, is inserted. Removable media is managed by an application or a volume
21 manager. \fBrmmount\fR can also be called by using \fBvolrmmount\fR(1).
22 .sp
23 .LP
24 Upon insertion of a medium and following invocation of the \fBvolcheck\fR(1)
25 command, \fBrmmount\fR determines what type of file system (if any) is on that
26 medium. If a file system is present, \fBrmmount\fR mounts the file system in
27 one of the locations listed below.
28 .sp
29 .LP
30 For a diskette (floppy):
31 .sp
32 .ne 2
33 .na
34 \fB\fB/floppy/floppy0\fR\fR
35 .ad
36 .RS 26n
37 symbolic link to mounted floppy in local floppy drive
38 .RE
40 .sp
41 .ne 2
42 .na
43 \fB\fB/floppy/floppy_name\fR\fR
44 .ad
45 .RS 26n
46 mounted named floppy
47 .RE
49 .sp
50 .ne 2
51 .na
52 \fB\fB/floppy/unnamed_floppy\fR\fR
53 .ad
54 .RS 26n
55 mounted unnamed floppy
56 .RE
58 .sp
59 .LP
60 For a CD-ROM or a DVD-ROM:
61 .sp
62 .ne 2
63 .na
64 \fB\fB/cdrom/cdrom0\fR\fR
65 .ad
66 .sp .6
67 .RS 4n
68 symbolic link to mounted \fBCD-ROM\fR in local \fBCD-ROM\fR drive
69 .RE
71 .sp
72 .ne 2
73 .na
74 \fB\fB/cdrom/CD-ROM_name\fR\fR
75 .ad
76 .sp .6
77 .RS 4n
78 mounted named \fBCD-ROM\fR
79 .RE
81 .sp
82 .ne 2
83 .na
84 \fB\fB/cdrom/CD-ROM_name/partition\fR\fR
85 .ad
86 .sp .6
87 .RS 4n
88 mounted named \fBCD-ROM\fR with partitioned file system
89 .RE
91 .sp
92 .ne 2
93 .na
94 \fB\fB/cdrom/unnamed_cdrom\fR\fR
95 .ad
96 .sp .6
97 .RS 4n
98 mounted unnamed \fBCD-ROM\fR
99 .RE
103 For a Zip drive:
105 .ne 2
107 \fB\fB/rmdisk/zip0\fR\fR
109 .RS 30n
110 symbolic link to mounted Zip medium in local Zip drive
114 .ne 2
116 \fB\fB/rmdisk/\fIZip_name\fR\fR\fR
118 .RS 30n
119 mounted named Zip medium
123 .ne 2
125 \fB\fB/rmdisk/\fIZip_name\fR/partition\fR\fR
127 .RS 30n
128 mounted named Zip medium with partitioned file system
132 .ne 2
134 \fB\fB/rmdisk/unnamed_zip\fR\fR
136 .RS 30n
137 mounted unnamed Zip medium
142 For a Jaz drive:
144 .ne 2
146 \fB\fB/rmdisk/jaz0\fR\fR
148 .RS 30n
149 symbolic link to mounted Jaz medium in local Jaz drive
153 .ne 2
155 \fB\fB/rmdisk/\fIJaz_name\fR\fR\fR
157 .RS 30n
158 mounted named Jaz medium
162 .ne 2
164 \fB\fB/rmdisk/\fIJaz_name\fR/partition\fR\fR
166 .RS 30n
167 mounted named Jaz medium with partitioned file system
171 .ne 2
173 \fB\fB/rmdisk/unnamed_Jaz\fR\fR
175 .RS 30n
176 mounted unnamed Jaz medium
181 For a generic "rmdisk" drive:
183 .ne 2
185 \fB\fB/rmdisk/rmdisk0\fR\fR
187 .sp .6
188 .RS 4n
189 symbolic link to mounted removable medium in local removable medium drive
193 .ne 2
195 \fB\fB/rmdisk/\fIrmdisk_name\fR\fR\fR
197 .sp .6
198 .RS 4n
199 mounted named removable medium
203 .ne 2
205 \fB\fB/rmdisk/\fIrmdisk_name\fR/partition\fR\fR
207 .sp .6
208 .RS 4n
209 mounted named removable medium with partitioned file system
213 .ne 2
215 \fB\fB/rmdisk/unnamed_rmdisk\fR\fR
217 .sp .6
218 .RS 4n
219 mounted unnamed removable medium
224 If the media is read-only (for example, a \fBCD-ROM\fR or a floppy with
225 write-protect tab set), the file system is mounted read-only.
228 If a file system is not identified, \fBrmmount\fR does not mount a file system.
229 See the \fI\fR for more information on the location of \fBCD-ROM\fR, floppy,
230 and other media without file systems.
233 If a file system type has been determined, it is then checked to see that it is
234 "clean." If the file system is "dirty," \fBfsck\fR \fB-p\fR (see
235 \fBfsck\fR(1M)) is run in an attempt to clean it. If \fBfsck\fR fails, the file
236 system is mounted read-only.
239 After the mount is complete, "actions" associated with the media type are
240 executed. These actions allow for the notification to other programs that new
241 media are available.
244 Actions are executed in the order in which they appear in the configuration
245 file. The action function can return either \fB1\fR or \fB0\fR. If it returns
246 \fB0\fR, no further actions will be executed. This allows the function to
247 control which applications are executed.
250 In order to execute an action, \fBrmmount\fR performs a \fBdlopen\fR(3C) on the
251 shared object and calls the action function defined within it. The definition
252 of the interface to actions can be found in \fB/usr/include/rmmount.h\fR.
255 File systems mounted by \fBrmmount\fR are always mounted with the \fBnosuid\fR
256 flag set, thereby disabling setuid programs and access to block or character
257 devices in that file system. Upon ejection, \fBrmmount\fR unmounts mounted file
258 systems and executes actions associated with the media type. If a file system
259 is "busy" (that is, it contains the current working directory of a live
260 process), the ejection will fail.
261 .SH OPTIONS
263 .ne 2
265 \fB\fB-D\fR\fR
267 .RS 6n
268 Turn on the debugging output from the \fBrmmount\fR \fBdprintf\fR calls.
271 .SH FILES
273 .ne 2
275 \fB\fB/usr/lib/rmmount/*.so.1\fR\fR
277 .RS 27n
278 shared objects used by \fBrmmount\fR.
281 .SH SEE ALSO
284 \fBvolcheck\fR(1), \fBvolrmmount\fR(1), \fBfsck\fR(1M), \fBdlopen\fR(3C),
285 \fBattributes\fR(5)
288 \fI\fR