]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - 6/sbin/tunefs/tunefs.8
Clone Kip's Xen on stable/6 tree so that I can work on improving FreeBSD/amd64
[FreeBSD/FreeBSD.git] / 6 / sbin / tunefs / tunefs.8
1 .\" Copyright (c) 1983, 1991, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 4. Neither the name of the University nor the names of its contributors
13 .\"    may be used to endorse or promote products derived from this software
14 .\"    without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" SUCH DAMAGE.
27 .\"
28 .\"     @(#)tunefs.8    8.2 (Berkeley) 12/11/93
29 .\" $FreeBSD$
30 .\"
31 .Dd August 13, 2007
32 .Dt TUNEFS 8
33 .Os
34 .Sh NAME
35 .Nm tunefs
36 .Nd tune up an existing file system
37 .Sh SYNOPSIS
38 .Nm
39 .Op Fl A
40 .Op Fl a Cm enable | disable
41 .Op Fl e Ar maxbpg
42 .Op Fl f Ar avgfilesize
43 .Op Fl L Ar volname
44 .Op Fl l Cm enable | disable
45 .Op Fl m Ar minfree
46 .Op Fl n Cm enable | disable
47 .Op Fl o Cm space | time
48 .Op Fl p
49 .Op Fl s Ar avgfpdir
50 .Ar special | filesystem
51 .Sh DESCRIPTION
52 The
53 .Nm
54 utility is designed to change the dynamic parameters of a file system
55 which affect the layout policies.
56 The
57 .Nm
58 utility cannot be run on an active file system.
59 To change an active file system,
60 it must be downgraded to read-only or unmounted.
61 .Pp
62 The parameters which are to be changed are indicated by the flags
63 given below:
64 .Bl -tag -width indent
65 .It Fl A
66 The file system has several backups of the super-block.
67 Specifying
68 this option will cause all backups to be modified as well as the
69 primary super-block.
70 This is potentially dangerous - use with caution.
71 .It Fl a Cm enable | disable
72 Turn on/off the administrative ACL enable flag.
73 .It Fl e Ar maxbpg
74 Indicate the maximum number of blocks any single file can
75 allocate out of a cylinder group before it is forced to begin
76 allocating blocks from another cylinder group.
77 Typically this value is set to about one quarter of the total blocks
78 in a cylinder group.
79 The intent is to prevent any single file from using up all the
80 blocks in a single cylinder group,
81 thus degrading access times for all files subsequently allocated
82 in that cylinder group.
83 The effect of this limit is to cause big files to do long seeks
84 more frequently than if they were allowed to allocate all the blocks
85 in a cylinder group before seeking elsewhere.
86 For file systems with exclusively large files,
87 this parameter should be set higher.
88 .It Fl f Ar avgfilesize
89 Specify the expected average file size.
90 .It Fl L Ar volname
91 Add/modify an optional file system volume label.
92 .It Fl l Cm enable | disable
93 Turn on/off MAC multilabel flag.
94 .It Fl m Ar minfree
95 Specify the percentage of space held back
96 from normal users; the minimum free space threshold.
97 The default value used is 8%.
98 Note that lowering the threshold can adversely affect performance:
99 .Bl -bullet
100 .It
101 Settings of 5% and less force space optimization to
102 always be used which will greatly increase the overhead for file
103 writes.
104 .It
105 The file system's ability to avoid fragmentation will be reduced
106 when the total free space, including the reserve, drops below 15%.
107 As free space approaches zero, throughput can degrade by up to a
108 factor of three over the performance obtained at a 10% threshold.
109 .El
110 .Pp
111 If the value is raised above the current usage level,
112 users will be unable to allocate files until enough files have
113 been deleted to get under the higher threshold.
114 .It Fl n Cm enable | disable
115 Turn on/off soft updates.
116 .It Fl o Cm space | time
117 The file system can either try to minimize the time spent
118 allocating blocks, or it can attempt to minimize the space
119 fragmentation on the disk.
120 Optimization for space has much
121 higher overhead for file writes.
122 The kernel normally changes the preference automatically as
123 the percent fragmentation changes on the file system.
124 .It Fl p
125 Show a summary of what the current tunable settings
126 are on the selected file system.
127 More detailed information can be
128 obtained from the
129 .Xr dumpfs 8
130 utility.
131 .It Fl s Ar avgfpdir
132 Specify the expected number of files per directory.
133 .El
134 .Pp
135 At least one of the above flags is required.
136 .Sh FILES
137 .Bl -tag -width ".Pa /etc/fstab"
138 .It Pa /etc/fstab
139 read this to determine the device file for a
140 specified mount point.
141 .El
142 .Sh SEE ALSO
143 .Xr fs 5 ,
144 .Xr dumpfs 8 ,
145 .Xr newfs 8
146 .Rs
147 .%A M. McKusick
148 .%A W. Joy
149 .%A S. Leffler
150 .%A R. Fabry
151 .%T "A Fast File System for UNIX"
152 .%J "ACM Transactions on Computer Systems 2"
153 .%N 3
154 .%P pp 181-197
155 .%D August 1984
156 .%O "(reprinted in the BSD System Manager's Manual, SMM:5)"
157 .Re
158 .Sh HISTORY
159 The
160 .Nm
161 utility appeared in
162 .Bx 4.2 .
163 .Sh BUGS
164 This utility should work on active file systems.
165 To change the root file system, the system must be rebooted
166 after the file system is tuned.
167 .\" Take this out and a Unix Daemon will dog your steps from now until
168 .\" the time_t's wrap around.
169 .Pp
170 You can tune a file system, but you cannot tune a fish.