]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - share/man/man5/tmpfs.5
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / share / man / man5 / tmpfs.5
1 .\"-
2 .\" Copyright (c) 2007 Xin LI
3 .\" 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 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\"
14 .\" THIS DOCUMENTATION IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 .\"
25 .\"-
26 .\" Copyright (c) 2005, 2006 The NetBSD Foundation, Inc.
27 .\" All rights reserved.
28 .\"
29 .\" Redistribution and use in source and binary forms, with or without
30 .\" modification, are permitted provided that the following conditions
31 .\" are met:
32 .\" 1. Redistributions of source code must retain the above copyright
33 .\"    notice, this list of conditions and the following disclaimer.
34 .\" 2. Redistributions in binary form must reproduce the above copyright
35 .\"    notice, this list of conditions and the following disclaimer in the
36 .\"    documentation and/or other materials provided with the distribution.
37 .\"
38 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
39 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
40 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
41 .\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
42 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
43 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
44 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
45 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
46 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
47 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
48 .\" POSSIBILITY OF SUCH DAMAGE.
49 .\"
50 .\" $FreeBSD$
51 .\"
52 .Dd April 23, 2012
53 .Dt TMPFS 5
54 .Os
55 .Sh NAME
56 .Nm tmpfs
57 .Nd "efficient memory file system"
58 .Sh SYNOPSIS
59 To compile this driver into the kernel,
60 place the following line in your
61 kernel configuration file:
62 .Bd -ragged -offset indent
63 .Cd "options TMPFS"
64 .Ed
65 .Pp
66 Alternatively, to load the driver as a
67 module at boot time, place the following line in
68 .Xr loader.conf 5 :
69 .Bd -literal -offset indent
70 tmpfs_load="YES"
71 .Ed
72 .Sh DESCRIPTION
73 The
74 .Nm
75 driver will permit the
76 .Fx
77 kernel to access
78 .Tn tmpfs
79 file systems.
80 .Sh OPTIONS
81 The following options are available when
82 mounting
83 .Nm
84 file systems:
85 .Bl -tag -width indent
86 .It Cm gid
87 Specifies the group ID of the root inode of the file system.
88 Defaults to the mount point's GID.
89 .It Cm uid
90 Specifies the user ID of the root inode of the file system.
91 Defaults to the mount point's UID.
92 .It Cm mode
93 Specifies the mode (in octal notation) of the root inode of the file system.
94 Defaults to the mount point's mode.
95 .It Cm inodes
96 Specifies the maximum number of nodes available to the file system.
97 If not specified, the file system chooses a reasonable maximum based on
98 the file system size, which can be limited with the
99 .Cm size
100 option.
101 .It Cm size
102 Specifies the total file system size in bytes.
103 If zero (the default) or a value larger than SIZE_MAX - PAGE_SIZE
104 is given, the available amount of memory (including
105 main memory and swap space) will be used.
106 .It Cm maxfilesize
107 Specifies the maximum file size in bytes.
108 Defaults to the maximum possible value.
109 .El
110 .Sh EXAMPLES
111 To mount a
112 .Nm
113 memory file system:
114 .Pp
115 .Dl "mount -t tmpfs tmpfs /tmp"
116 .Sh SEE ALSO
117 .Xr nmount 2 ,
118 .Xr unmount 2 ,
119 .Xr fstab 5 ,
120 .Xr mdmfs 8 ,
121 .Xr mount 8
122 .Sh HISTORY
123 The
124 .Nm
125 driver first appeared in
126 .Fx 7.0 .
127 .Sh AUTHORS
128 .An -nosplit
129 The
130 .Nm
131 kernel implementation was written by
132 .An Julio M. Merino Vidal Aq jmmv@NetBSD.org
133 as a Google SoC project.
134 .Pp
135 .An Rohit Jalan
136 and others ported it from
137 .Nx
138 to
139 .Fx .
140 .Pp
141 This manual page was written by
142 .An Xin LI Aq delphij@FreeBSD.org .
143 .Sh BUGS
144 Some file system mount time options may not be well-supported.