Deleted Added
full compact
tunefs.8 (200796) tunefs.8 (207141)
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
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: head/sbin/tunefs/tunefs.8 200796 2009-12-21 19:39:10Z trasz $
29.\" $FreeBSD: head/sbin/tunefs/tunefs.8 207141 2010-04-24 07:05:35Z jeff $
30.\"
30.\"
31.Dd October 21, 2009
31.Dd March 6, 2010
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
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 j Cm enable | disable
43.Op Fl J Cm enable | disable
44.Op Fl L Ar volname
45.Op Fl l Cm enable | disable
46.Op Fl m Ar minfree
47.Op Fl N Cm enable | disable
48.Op Fl n Cm enable | disable
49.Op Fl o Cm space | time
50.Op Fl p
51.Op Fl s Ar avgfpdir
44.Op Fl J Cm enable | disable
45.Op Fl L Ar volname
46.Op Fl l Cm enable | disable
47.Op Fl m Ar minfree
48.Op Fl N Cm enable | disable
49.Op Fl n Cm enable | disable
50.Op Fl o Cm space | time
51.Op Fl p
52.Op Fl s Ar avgfpdir
53.Op Fl S Ar size
52.Ar special | filesystem
53.Sh DESCRIPTION
54The
55.Nm
56utility is designed to change the dynamic parameters of a file system
57which affect the layout policies.
58The
59.Nm
60utility cannot be run on an active file system.
61To change an active file system,
62it must be downgraded to read-only or unmounted.
63.Pp
64The parameters which are to be changed are indicated by the flags
65given below:
66.Bl -tag -width indent
67.It Fl A
68The file system has several backups of the super-block.
69Specifying
70this option will cause all backups to be modified as well as the
71primary super-block.
72This is potentially dangerous - use with caution.
73.It Fl a Cm enable | disable
74Turn on/off the administrative POSIX.1e ACL enable flag.
75.It Fl e Ar maxbpg
76Indicate the maximum number of blocks any single file can
77allocate out of a cylinder group before it is forced to begin
78allocating blocks from another cylinder group.
79Typically this value is set to about one quarter of the total blocks
80in a cylinder group.
81The intent is to prevent any single file from using up all the
82blocks in a single cylinder group,
83thus degrading access times for all files subsequently allocated
84in that cylinder group.
85The effect of this limit is to cause big files to do long seeks
86more frequently than if they were allowed to allocate all the blocks
87in a cylinder group before seeking elsewhere.
88For file systems with exclusively large files,
89this parameter should be set higher.
90.It Fl f Ar avgfilesize
91Specify the expected average file size.
54.Ar special | filesystem
55.Sh DESCRIPTION
56The
57.Nm
58utility is designed to change the dynamic parameters of a file system
59which affect the layout policies.
60The
61.Nm
62utility cannot be run on an active file system.
63To change an active file system,
64it must be downgraded to read-only or unmounted.
65.Pp
66The parameters which are to be changed are indicated by the flags
67given below:
68.Bl -tag -width indent
69.It Fl A
70The file system has several backups of the super-block.
71Specifying
72this option will cause all backups to be modified as well as the
73primary super-block.
74This is potentially dangerous - use with caution.
75.It Fl a Cm enable | disable
76Turn on/off the administrative POSIX.1e ACL enable flag.
77.It Fl e Ar maxbpg
78Indicate the maximum number of blocks any single file can
79allocate out of a cylinder group before it is forced to begin
80allocating blocks from another cylinder group.
81Typically this value is set to about one quarter of the total blocks
82in a cylinder group.
83The intent is to prevent any single file from using up all the
84blocks in a single cylinder group,
85thus degrading access times for all files subsequently allocated
86in that cylinder group.
87The effect of this limit is to cause big files to do long seeks
88more frequently than if they were allowed to allocate all the blocks
89in a cylinder group before seeking elsewhere.
90For file systems with exclusively large files,
91this parameter should be set higher.
92.It Fl f Ar avgfilesize
93Specify the expected average file size.
94.It Fl j Cm enable | disable
95Turn on/off soft updates journaling.
92.It Fl J Cm enable | disable
93Turn on/off gjournal flag.
94.It Fl L Ar volname
95Add/modify an optional file system volume label.
96.It Fl l Cm enable | disable
97Turn on/off MAC multilabel flag.
98.It Fl m Ar minfree
99Specify the percentage of space held back
100from normal users; the minimum free space threshold.
101The default value used is 8%.
102Note that lowering the threshold can adversely affect performance:
103.Bl -bullet
104.It
105Settings of 5% and less force space optimization to
106always be used which will greatly increase the overhead for file
107writes.
108.It
109The file system's ability to avoid fragmentation will be reduced
110when the total free space, including the reserve, drops below 15%.
111As free space approaches zero, throughput can degrade by up to a
112factor of three over the performance obtained at a 10% threshold.
113.El
114.Pp
115If the value is raised above the current usage level,
116users will be unable to allocate files until enough files have
117been deleted to get under the higher threshold.
118.It Fl N Cm enable | disable
119Turn on/off the administrative NFSv4 ACL enable flag.
120.It Fl n Cm enable | disable
121Turn on/off soft updates.
122.It Fl o Cm space | time
123The file system can either try to minimize the time spent
124allocating blocks, or it can attempt to minimize the space
125fragmentation on the disk.
126Optimization for space has much
127higher overhead for file writes.
128The kernel normally changes the preference automatically as
129the percent fragmentation changes on the file system.
130.It Fl p
131Show a summary of what the current tunable settings
132are on the selected file system.
133More detailed information can be
134obtained from the
135.Xr dumpfs 8
136utility.
137.It Fl s Ar avgfpdir
138Specify the expected number of files per directory.
96.It Fl J Cm enable | disable
97Turn on/off gjournal flag.
98.It Fl L Ar volname
99Add/modify an optional file system volume label.
100.It Fl l Cm enable | disable
101Turn on/off MAC multilabel flag.
102.It Fl m Ar minfree
103Specify the percentage of space held back
104from normal users; the minimum free space threshold.
105The default value used is 8%.
106Note that lowering the threshold can adversely affect performance:
107.Bl -bullet
108.It
109Settings of 5% and less force space optimization to
110always be used which will greatly increase the overhead for file
111writes.
112.It
113The file system's ability to avoid fragmentation will be reduced
114when the total free space, including the reserve, drops below 15%.
115As free space approaches zero, throughput can degrade by up to a
116factor of three over the performance obtained at a 10% threshold.
117.El
118.Pp
119If the value is raised above the current usage level,
120users will be unable to allocate files until enough files have
121been deleted to get under the higher threshold.
122.It Fl N Cm enable | disable
123Turn on/off the administrative NFSv4 ACL enable flag.
124.It Fl n Cm enable | disable
125Turn on/off soft updates.
126.It Fl o Cm space | time
127The file system can either try to minimize the time spent
128allocating blocks, or it can attempt to minimize the space
129fragmentation on the disk.
130Optimization for space has much
131higher overhead for file writes.
132The kernel normally changes the preference automatically as
133the percent fragmentation changes on the file system.
134.It Fl p
135Show a summary of what the current tunable settings
136are on the selected file system.
137More detailed information can be
138obtained from the
139.Xr dumpfs 8
140utility.
141.It Fl s Ar avgfpdir
142Specify the expected number of files per directory.
143.It Fl S Ar size
144Specify the softdep journal size in bytes.
145The minimum is 4M.
139.El
140.Pp
141At least one of the above flags is required.
142.Sh FILES
143.Bl -tag -width ".Pa /etc/fstab"
144.It Pa /etc/fstab
145read this to determine the device file for a
146specified mount point.
147.El
148.Sh SEE ALSO
149.Xr fs 5 ,
150.Xr dumpfs 8 ,
151.Xr gjournal 8 ,
152.Xr newfs 8
153.Rs
154.%A M. McKusick
155.%A W. Joy
156.%A S. Leffler
157.%A R. Fabry
158.%T "A Fast File System for UNIX"
159.%J "ACM Transactions on Computer Systems 2"
160.%N 3
161.%P pp 181-197
162.%D August 1984
163.%O "(reprinted in the BSD System Manager's Manual, SMM:5)"
164.Re
165.Sh HISTORY
166The
167.Nm
168utility appeared in
169.Bx 4.2 .
170.Sh BUGS
171This utility does not work on active file systems.
172To change the root file system, the system must be rebooted
173after the file system is tuned.
174.\" Take this out and a Unix Daemon will dog your steps from now until
175.\" the time_t's wrap around.
176.Pp
177You can tune a file system, but you cannot tune a fish.
146.El
147.Pp
148At least one of the above flags is required.
149.Sh FILES
150.Bl -tag -width ".Pa /etc/fstab"
151.It Pa /etc/fstab
152read this to determine the device file for a
153specified mount point.
154.El
155.Sh SEE ALSO
156.Xr fs 5 ,
157.Xr dumpfs 8 ,
158.Xr gjournal 8 ,
159.Xr newfs 8
160.Rs
161.%A M. McKusick
162.%A W. Joy
163.%A S. Leffler
164.%A R. Fabry
165.%T "A Fast File System for UNIX"
166.%J "ACM Transactions on Computer Systems 2"
167.%N 3
168.%P pp 181-197
169.%D August 1984
170.%O "(reprinted in the BSD System Manager's Manual, SMM:5)"
171.Re
172.Sh HISTORY
173The
174.Nm
175utility appeared in
176.Bx 4.2 .
177.Sh BUGS
178This utility does not work on active file systems.
179To change the root file system, the system must be rebooted
180after the file system is tuned.
181.\" Take this out and a Unix Daemon will dog your steps from now until
182.\" the time_t's wrap around.
183.Pp
184You can tune a file system, but you cannot tune a fish.