]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - share/man/man7/ffs.7
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / share / man / man7 / ffs.7
1 .\" Copyright (c) 2001 Networks Associates Technology, Inc.
2 .\" All rights reserved.
3 .\"
4 .\" This software was developed for the FreeBSD Project by Chris
5 .\" Costello at Safeport Network Services and NAI Labs, the Security
6 .\" Research Division of Network Associates, Inc. under DARPA/SPAWAR
7 .\" contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA CHATS
8 .\" research program.
9 .\"
10 .\" Redistribution and use in source and binary forms, with or without
11 .\" modification, are permitted provided that the following conditions
12 .\" are met:
13 .\" 1. Redistributions of source code must retain the above copyright
14 .\"    notice, this list of conditions and the following disclaimer.
15 .\" 2. Redistributions in binary form must reproduce the above copyright
16 .\"    notice, this list of conditions and the following disclaimer in the
17 .\"    documentation and/or other materials provided with the distribution.
18 .\"
19 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
20 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
23 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 .\" SUCH DAMAGE.
30 .\"
31 .\" $FreeBSD$
32 .\"
33 .Dd December 26, 2001
34 .Dt FFS 7
35 .Os
36 .Sh NAME
37 .Nm ffs
38 .Nd Berkeley fast file system
39 .Sh SYNOPSIS
40 In the kernel configuration file:
41 .Cd "options FFS"
42 .Cd "options QUOTA"
43 .Cd "options SOFTUPDATES"
44 .Cd "options SUIDDIR"
45 .Cd "options UFS_ACL"
46 .Cd "options UFS_DIRHASH"
47 .Cd "options UFS_EXTATTR"
48 .Cd "options UFS_EXTATTR_AUTOSTART"
49 .Pp
50 In
51 .Xr fstab 5 :
52 .Bd -literal -compact
53 /dev/disk0a     /mnt ufs rw 1 1
54 .Ed
55 .Sh DESCRIPTION
56 The Berkeley fast file system
57 provides facilities to store file system data onto a disk device.
58 .Nm
59 has been optimized over the years
60 for speed and reliability
61 and is the default
62 .Fx
63 file system.
64 .Ss Quotas
65 .Bl -tag -width 2n
66 .It Cd "options QUOTA"
67 This option allows system administrators
68 to set limits on disk usage
69 on a per-user basis.
70 Quotas can be used only on file systems
71 mounted with the
72 .Cm quota
73 option;
74 see
75 .Xr quota 1
76 and
77 .Xr edquota 8 .
78 .El
79 .Ss Soft Updates
80 .Bl -tag -width 2n
81 .It Cd "options SOFTUPDATES"
82 The soft updates feature tracks writes to the disk
83 and enforces metadata update dependencies
84 (e.g., updating free block maps)
85 to ensure that the file system remains consistent.
86 .Pp
87 To enable soft updates on an
88 .Em unmounted
89 file system, use the following command:
90 .Pp
91 .D1 Nm tunefs Fl n Cm enable Ar fs
92 .Pp
93 .Ar fs
94 can be either a mount point listed in
95 .Xr fstab 5
96 (e.g.,
97 .Pa /usr ) ,
98 or a disk device
99 (e.g.,
100 .Pa /dev/da0a ) .
101 .El
102 .Ss File Ownership Inheritance
103 .Bl -tag -width 2n
104 .It Cd "options SUIDDIR"
105 For use in file sharing environments
106 on networks including
107 .Tn "Microsoft Windows"
108 and
109 .Tn "Apple Macintosh"
110 computers,
111 this option allows files on file systems
112 mounted with the
113 .Cm suiddir
114 option
115 to inherit the ownership of its directory,
116 i.e.,
117 .Dq "if it's my directory, it must be my file."
118 .El
119 .Ss Access Control Lists
120 .Bl -tag -width 2n
121 .It Cd "options UFS_ACL"
122 Access control lists allow the association of
123 fine-grained discretionary access control information
124 with files and directories.
125 This option requires the presence of the
126 .Dv UFS_EXTATTR
127 option, and it is recommended that
128 .Dv UFS_EXTATTR_AUTOSTART
129 is included as well,
130 so that ACLs are enabled atomically upon mounting the file system.
131 .El
132 .Pp
133 In order to enable support for ACLs,
134 two extended attributes must be available in the
135 .Dv EXTATTR_NAMESPACE_SYSTEM
136 namespace:
137 .Pa posix1e.acl_access ,
138 which holds the access ACL,
139 and
140 .Pa posix1e.acl_default ,
141 which holds the default ACL for directories.
142 If you are using file system extended attributes,
143 the following commands may be used to
144 allocate space for and create the necessary EA backing files
145 for ACLs in the root of each file system.
146 In these examples, the root file system is used;
147 see
148 .Sx "Extended Attributes"
149 for more details.
150 .Bd -literal -offset indent
151 mkdir -p /.attribute/system
152 cd /.attribute/system
153 extattrctl initattr -p / 388 posix1e.acl_access
154 extattrctl initattr -p / 388 posix1e.acl_default
155 .Ed
156 .Pp
157 On the next mount of the root file system,
158 the attributes will be automatically started
159 (if
160 .Dv UFS_EXTATTR_AUTOSTART
161 is included in the kernel configuration),
162 and ACLs will be enabled.
163 .Ss Directory Hashing
164 .Bl -tag -width 2n
165 .It Cd "options UFS_DIRHASH"
166 Implements a hash-based lookup scheme for directories
167 in order to speed up accesses to very large directories.
168 .El
169 .Ss Extended Attributes
170 .Bl -tag -width 2n
171 .It Cd "options UFS_EXTATTR"
172 Extended attributes allow the association of
173 additional arbitrary metadata with files and directories,
174 which can be assigned and retrieved from userland
175 as well as from within the kernel; see
176 .Xr extattrctl 8 .
177 .It Cd "options UFS_EXTATTR_AUTOSTART"
178 If this option is defined,
179 .Nm
180 will search for a
181 .Pa .attribute
182 subdirectory of the file system root during the mount operation.
183 If found, extended attribute support will be
184 automatically started for that file system.
185 .El
186 .Pp
187 The following
188 .Xr sysctl 8
189 MIBs are defined for use with
190 .Nm :
191 .Bl -hang -width ".Va vfs.ffs.doreallocblk"
192 .It Va vfs.ffs.doasyncfree
193 Asynchronously write out modified i-node and indirect blocks
194 upon reallocating file system blocks to be contiguous.
195 (Default: 1.)
196 .It Va vfs.ffs.doreallocblks
197 Enable support for the rearrangement of blocks
198 to be contiguous.
199 (Default: 1.)
200 .El
201 .Sh SEE ALSO
202 .Xr quota 1 ,
203 .Xr acl 3 ,
204 .Xr extattr 3 ,
205 .Xr edquota 8 ,
206 .Xr extattrctl 8 ,
207 .Xr sysctl 8
208 .Rs
209 .%A M. McKusick
210 .%A W. Joy
211 .%A S. Leffler
212 .%A R. Fabry
213 .%D August 1984
214 .%T "A Fast File System for UNIX"
215 .%J "ACM Transactions on Computer Systems"
216 .%N 2
217 .%V 3
218 .%P 181-197
219 .Re
220 .Rs
221 .%A M. McKusick
222 .%D June 2000
223 .%T "Soft Updates: A Technique for Eliminating Most Synchronous Writes in the Fast Filesystem"
224 .%J "Proceedings of the Freenix Track at the 1999 Usenix Annual Technical Conference"
225 .%P 71-84
226 .Re