Print this page
6198 Let's EOL cachefs
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man4/mnttab.4
+++ new/usr/src/man/man4/mnttab.4
1 1 '\" te
2 2 .\" Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
3 +.\" Copyright 2015 Nexenta Systems, Inc. All rights reserved.
3 4 .\" Copyright 1989 AT&T
4 5 .\" 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.
5 6 .\" 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.
6 7 .\" 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]
7 -.TH MNTTAB 4 "Dec 20, 2003"
8 +.TH MNTTAB 4 "Sep 8, 2015"
8 9 .SH NAME
9 10 mnttab \- mounted file system table
10 11 .SH DESCRIPTION
11 12 .sp
12 13 .LP
13 14 The file \fB/etc/mnttab\fR is really a file system that provides read-only
14 15 access to the table of mounted file systems for the current host.
15 16 \fB/etc/mnttab\fR is read by programs using the routines described in
16 17 \fBgetmntent\fR(3C). Mounting a file system adds an entry to this table.
17 18 Unmounting removes an entry from this table. Remounting a file system causes
18 19 the information in the mounted file system table to be updated to reflect any
19 20 changes caused by the remount. The list is maintained by the kernel in order of
20 21 mount time. That is, the first mounted file system is first in the list and the
21 22 most recently mounted file system is last. When mounted on a mount point the
22 23 file system appears as a regular file containing the current \fBmnttab\fR
23 24 information.
24 25 .sp
25 26 .LP
26 27 Each entry is a line of fields separated by TABs in the form:
27 28 .sp
28 29 .in +2
29 30 .nf
30 31 \fIspecial mount_point fstype options time\fR
31 32 .fi
32 33 .in -2
33 34
34 35 .sp
35 36 .LP
36 37 where:
37 38 .sp
38 39 .ne 2
39 40 .na
40 41 \fB\fIspecial\fR\fR
41 42 .ad
42 43 .RS 15n
43 44 The name of the resource that has been mounted.
44 45 .RE
45 46
46 47 .sp
47 48 .ne 2
48 49 .na
49 50 \fB\fImount_point\fR\fR
50 51 .ad
51 52 .RS 15n
52 53 The pathname of the directory on which the filesystem is mounted.
53 54 .RE
54 55
55 56 .sp
56 57 .ne 2
57 58 .na
58 59 \fB\fIfstype\fR\fR
59 60 .ad
60 61 .RS 15n
61 62 The file system type of the mounted file system.
62 63 .RE
63 64
64 65 .sp
65 66 .ne 2
66 67 .na
67 68 \fB\fIoptions\fR\fR
68 69 .ad
69 70 .RS 15n
70 71 The mount options. See respective mount file system man page in the See Also
71 72 section below.
72 73 .RE
73 74
74 75 .sp
75 76 .ne 2
76 77 .na
77 78 \fB\fItime\fR\fR
78 79 .ad
79 80 .RS 15n
80 81 The time at which the file system was mounted.
81 82 .RE
82 83
83 84 .sp
84 85 .LP
85 86 Examples of entries for the \fIspecial\fR field include the pathname of a
86 87 block-special device, the name of a remote file system in the form of
87 88 \fIhost:pathname\fR, or the name of a \fBswap file\fR, for example, a file made
88 89 with \fBmkfile\fR(1M).
89 90 .SH IOCTLS
90 91 .sp
91 92 .LP
92 93 The following \fBioctl\fR(2) calls are supported:
93 94 .sp
94 95 .ne 2
95 96 .na
96 97 \fB\fBMNTIOC_NMNTS\fR\fR
97 98 .ad
98 99 .RS 21n
99 100 Returns the count of mounted resources in the current snapshot in the
100 101 \fBuint32_t\fR pointed to by \fIarg\fR.
101 102 .RE
102 103
103 104 .sp
104 105 .ne 2
105 106 .na
106 107 \fB\fBMNTIOC_GETDEVLIST\fR\fR
107 108 .ad
108 109 .RS 21n
109 110 Returns an array of \fBuint32_t\fR's that is twice as long as the length
110 111 returned by \fBMNTIOC_NMNTS\fR. Each pair of numbers is the major and minor
111 112 device number for the file system at the corresponding line in the current
112 113 \fB/etc/mnttab\fR snapshot. \fIarg\fR points to the memory buffer to receive
113 114 the device number information.
114 115 .RE
115 116
116 117 .sp
117 118 .ne 2
118 119 .na
119 120 \fB\fBMNTIOC_SETTAG\fR\fR
120 121 .ad
121 122 .RS 21n
122 123 Sets a tag word into the options list for a mounted file system. A tag is a
123 124 notation that will appear in the options string of a mounted file system but it
124 125 is not recognized or interpreted by the file system code. \fIarg\fR points to a
125 126 filled in \fBmnttagdesc\fR structure, as shown in the following example:
126 127 .sp
127 128 .in +2
128 129 .nf
129 130 uint_t mtd_major; /* major number for mounted fs */
130 131 uint_t mtd_minor; /* minor number for mounted fs */
131 132 char *mtd_mntpt; /* mount point of file system */
132 133 char *mtd_tag; /* tag to set/clear */
133 134 .fi
134 135 .in -2
135 136
136 137 If the tag already exists then it is marked as set but not re-added. Tags can
137 138 be at most \fBMAX_MNTOPT_TAG\fR long.
138 139 .sp
139 140 Use of this ioctl is restricted to processes with the \fB{PRIV_SYS_MOUNT}\fR
140 141 privilege.
141 142 .RE
142 143
143 144 .sp
144 145 .ne 2
145 146 .na
146 147 \fB\fBMNTIOC_CLRTAG\fR\fR
147 148 .ad
148 149 .RS 21n
149 150 Marks a tag in the options list for a mounted file system as not set. \fIarg\fR
150 151 points to the same structure as \fBMNTIOC_SETTAG\fR, which identifies the file
151 152 system and tag to be cleared.
152 153 .sp
153 154 Use of this ioctl is restricted to processes with the \fB{PRIV_SYS_MOUNT}\fR
154 155 privilege.
155 156 .RE
156 157
157 158 .SH ERRORS
158 159 .sp
159 160 .ne 2
160 161 .na
161 162 \fB\fBEFAULT\fR\fR
162 163 .ad
163 164 .RS 16n
164 165 The arg pointer in an \fBMNTIOC_ ioctl\fR call pointed to an inaccessible
165 166 memory location or a character pointer in a \fBmnttagdesc\fR structure pointed
166 167 to an inaccessible memory location.
167 168 .RE
168 169
169 170 .sp
170 171 .ne 2
171 172 .na
172 173 \fB\fBEINVAL\fR\fR
173 174 .ad
174 175 .RS 16n
175 176 The tag specified in a \fBMNTIOC_SETTAG\fR call already exists as a file system
176 177 option, or the tag specified in a \fBMNTIOC_CLRTAG\fR call does not exist.
177 178 .RE
178 179
179 180 .sp
180 181 .ne 2
181 182 .na
182 183 \fB\fBENAMETOOLONG\fR\fR
183 184 .ad
184 185 .RS 16n
185 186 The tag specified in a \fBMNTIOC_SETTAG\fR call is too long or the tag would
186 187 make the total length of the option string for the mounted file system too
187 188 long.
188 189 .RE
189 190
190 191 .sp
191 192 .ne 2
192 193 .na
193 194 \fB\fBEPERM\fR\fR
194 195 .ad
195 196 .RS 16n
196 197 The calling process does not have \fB{PRIV_SYS_MOUNT}\fR privilege and either a
197 198 \fBMNTIOC_SETTAG\fR or \fBMNTIOC_CLRTAG\fR call was made.
198 199 .RE
199 200
200 201 .SH FILES
201 202 .sp
202 203 .ne 2
203 204 .na
204 205 \fB\fB/etc/mnttab\fR\fR
205 206 .ad
206 207 .RS 28n
207 208 Usual mount point for \fBmnttab\fR file system
208 209 .RE
209 210
210 211 .sp
211 212 .ne 2
↓ open down ↓ |
194 lines elided |
↑ open up ↑ |
212 213 .na
213 214 \fB\fB/usr/include/sys/mntio.h\fR\fR
214 215 .ad
215 216 .RS 28n
216 217 Header file that contains \fBIOCTL\fR definitions
217 218 .RE
218 219
219 220 .SH SEE ALSO
220 221 .sp
221 222 .LP
222 -\fBmkfile\fR(1M), \fBmount_cachefs\fR(1M), \fBmount_hsfs\fR(1M),
223 -\fBmount_nfs\fR(1M), \fBmount_pcfs\fR(1M), \fBmount_ufs\fR(1M),
224 -\fBmount\fR(1M), \fBioctl\fR(2), \fBread\fR(2), \fBpoll\fR(2), \fBstat\fR(2),
223 +\fBmkfile\fR(1M), \fBmount_hsfs\fR(1M), \fBmount_nfs\fR(1M),
224 +\fBmount_pcfs\fR(1M), \fBmount_ufs\fR(1M), \fBmount\fR(1M),
225 +\fBioctl\fR(2), \fBread\fR(2), \fBpoll\fR(2), \fBstat\fR(2),
225 226 \fBgetmntent\fR(3C)
226 227 .SH WARNINGS
227 228 .sp
228 229 .LP
229 230 The \fBmnttab\fR file system provides the previously undocumented
230 231 \fBdev=\fR\fIxxx\fR option in the option string for each mounted file system.
231 232 This is provided for legacy applications that might have been using the
232 233 \fBdev=information\fR option.
233 234 .sp
234 235 .LP
235 236 Using \fBdev=\fR\fIoption\fR in applications is strongly discouraged. The
236 237 device number string represents a 32-bit quantity and might not contain correct
237 238 information in 64-bit environments.
238 239 .sp
239 240 .LP
240 241 Applications requiring device number information for mounted file systems
241 242 should use the \fBgetextmntent\fR(3C) interface, which functions properly in
242 243 either 32- or 64-bit environments.
243 244 .SH NOTES
244 245 .sp
245 246 .LP
246 247 The snapshot of the \fBmnttab\fR information is taken any time a \fBread\fR(2)
247 248 is performed at offset \fB0\fR (the beginning) of the \fBmnttab\fR file. The
248 249 file modification time returned by \fBstat\fR(2) for the \fBmnttab\fR file is
249 250 the time of the last change to mounted file system information. A \fBpoll\fR(2)
250 251 system call requesting a \fBPOLLRDBAND\fR event can be used to block and wait
251 252 for the system's mounted file system information to be different from the most
252 253 recent snapshot since the \fBmnttab\fR file was opened.
↓ open down ↓ |
18 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX