summaryrefslogtreecommitdiff
path: root/static/freebsd/man4/ffs.4 3.html
diff options
context:
space:
mode:
Diffstat (limited to 'static/freebsd/man4/ffs.4 3.html')
-rw-r--r--static/freebsd/man4/ffs.4 3.html273
1 files changed, 273 insertions, 0 deletions
diff --git a/static/freebsd/man4/ffs.4 3.html b/static/freebsd/man4/ffs.4 3.html
new file mode 100644
index 00000000..6c903d85
--- /dev/null
+++ b/static/freebsd/man4/ffs.4 3.html
@@ -0,0 +1,273 @@
+<table class="head">
+ <tr>
+ <td class="head-ltitle">FFS(4)</td>
+ <td class="head-vol">Device Drivers Manual</td>
+ <td class="head-rtitle">FFS(4)</td>
+ </tr>
+</table>
+<div class="manual-text">
+<section class="Sh">
+<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
+<p class="Pp"><code class="Nm">ffs</code>, <code class="Nm">ufs</code> &#x2014;
+ <span class="Nd">Berkeley fast file system</span></p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
+<p class="Pp">In the kernel configuration file:
+ <br/>
+ <code class="Cd">options FFS</code>
+ <br/>
+ <code class="Cd">options QUOTA</code>
+ <br/>
+ <code class="Cd">options SOFTUPDATES</code>
+ <br/>
+ <code class="Cd">options SUIDDIR</code>
+ <br/>
+ <code class="Cd">options UFS_ACL</code>
+ <br/>
+ <code class="Cd">options UFS_DIRHASH</code>
+ <br/>
+ <code class="Cd">options UFS_EXTATTR</code>
+ <br/>
+ <code class="Cd">options UFS_EXTATTR_AUTOSTART</code>
+ <br/>
+ <code class="Cd">options UFS_GJOURNAL</code></p>
+<p class="Pp">In <a class="Xr">fstab(5)</a>:</p>
+<div class="Bd Li">
+<pre>/dev/disk0a /mnt ufs rw 1 1</pre>
+</div>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
+<p class="Pp">The Berkeley fast file system provides facilities to store file
+ system data onto a disk device. <code class="Nm">ffs</code> has been
+ optimized over the years for speed and reliability and is the default
+ <span class="Ux">FreeBSD</span> file system.</p>
+<section class="Ss">
+<h2 class="Ss" id="Quotas"><a class="permalink" href="#Quotas">Quotas</a></h2>
+<dl class="Bl-tag">
+ <dt><code class="Cd">options QUOTA</code></dt>
+ <dd>This option allows system administrators to set limits on disk usage on a
+ per-user basis. Quotas can be used only on file systems mounted with the
+ <code class="Cm">quota</code> option; see <a class="Xr">quota(1)</a> and
+ <a class="Xr">edquota(8)</a>.</dd>
+</dl>
+</section>
+<section class="Ss">
+<h2 class="Ss" id="Soft_Updates"><a class="permalink" href="#Soft_Updates">Soft
+ Updates</a></h2>
+<dl class="Bl-tag">
+ <dt><code class="Cd">options SOFTUPDATES</code></dt>
+ <dd>The soft updates feature tracks writes to the disk and enforces metadata
+ update dependencies (e.g., updating free block maps) to ensure that the
+ file system remains consistent.
+ <p class="Pp">To create a new file system with the soft updates enabled, use
+ <a class="Xr">newfs(8)</a> command:</p>
+ <p class="Pp"></p>
+ <div class="Bd Bd-indent"><code class="Nm">newfs</code>
+ <code class="Fl">-U</code> <var class="Ar">fs</var></div>
+ <p class="Pp"><var class="Ar">fs</var> can be either a mount point listed in
+ <a class="Xr">fstab(5)</a> (e.g., <span class="Pa">/usr</span>), or a
+ disk device (e.g., <span class="Pa">/dev/da0a</span>).</p>
+ <p class="Pp">It is possible to enable soft updates on an
+ <i class="Em">unmounted</i> file system by using
+ <a class="Xr">tunefs(8)</a> command:</p>
+ <p class="Pp"></p>
+ <div class="Bd Bd-indent"><code class="Nm">tunefs</code>
+ <code class="Fl">-n</code> <code class="Cm">enable</code>
+ <var class="Ar">fs</var></div>
+ <p class="Pp">Soft updates can also add journaling that reduces the time
+ spent by <a class="Xr">fsck_ffs(8)</a> cleaning up a filesystem after a
+ crash from several minutes to a few seconds. The journal is placed in an
+ inode named <span class="Pa">.sujournal</span>, and is kept as a
+ circular log of segments containing records that describe metadata
+ operations.</p>
+ <p class="Pp">To create a new file system with both the soft updates and
+ soft updates journaling enabled, use the following command:</p>
+ <p class="Pp"></p>
+ <div class="Bd Bd-indent"><code class="Nm">newfs</code>
+ <code class="Fl">-j</code> <var class="Ar">fs</var></div>
+ <p class="Pp">This runs <a class="Xr">tunefs(8)</a> command after
+ <a class="Xr">newfs(8)</a> command with <code class="Fl">-U</code> flag
+ enabled. It is possible to enable soft updates journaling on an
+ <i class="Em">unmounted</i> file system by using
+ <a class="Xr">tunefs(8)</a> command:</p>
+ <p class="Pp"></p>
+ <div class="Bd Bd-indent"><code class="Nm">tunefs</code>
+ <code class="Fl">-j</code> <code class="Cm">enable</code>
+ <var class="Ar">fs</var></div>
+ <p class="Pp">This flag automatically enables the soft updates feature when
+ it is not enabled. Note that this <a class="Xr">tunefs(8)</a> command
+ will fail if a file <span class="Pa">.sujournal</span> already exists
+ before enabling the soft updates journaling.</p>
+ </dd>
+</dl>
+</section>
+<section class="Ss">
+<h2 class="Ss" id="File_Ownership_Inheritance"><a class="permalink" href="#File_Ownership_Inheritance">File
+ Ownership Inheritance</a></h2>
+<dl class="Bl-tag">
+ <dt><code class="Cd">options SUIDDIR</code></dt>
+ <dd>For use in file sharing environments on networks including Microsoft
+ Windows and Apple Macintosh computers, this option allows files on file
+ systems mounted with the <code class="Cm">suiddir</code> option to inherit
+ the ownership of its directory, i.e., &#x201C;if it's my directory, it
+ must be my file.&#x201D;</dd>
+</dl>
+</section>
+<section class="Ss">
+<h2 class="Ss" id="Access_Control_Lists"><a class="permalink" href="#Access_Control_Lists">Access
+ Control Lists</a></h2>
+<dl class="Bl-tag">
+ <dt><code class="Cd">options UFS_ACL</code></dt>
+ <dd>Access control lists allow the association of fine-grained discretionary
+ access control information with files and directories. This option
+ requires the presence of the <code class="Dv">UFS_EXTATTR</code> option,
+ and it is recommended that <code class="Dv">UFS_EXTATTR_AUTOSTART</code>
+ is included as well, so that ACLs are enabled atomically upon mounting the
+ file system.</dd>
+</dl>
+<p class="Pp">In order to enable support for ACLs, two extended attributes must
+ be available in the <code class="Dv">EXTATTR_NAMESPACE_SYSTEM</code>
+ namespace: <span class="Pa">posix1e.acl_access</span>, which holds the
+ access ACL, and <span class="Pa">posix1e.acl_default</span>, which holds the
+ default ACL for directories. If you are using file system extended
+ attributes, the following commands may be used to allocate space for and
+ create the necessary EA backing files for ACLs in the root of each file
+ system. In these examples, the root file system is used; see
+ <a class="Sx" href="#Extended_Attributes">Extended Attributes</a> for more
+ details.</p>
+<div class="Bd Pp Bd-indent Li">
+<pre>mkdir -p /.attribute/system
+cd /.attribute/system
+extattrctl initattr -p / 388 posix1e.acl_access
+extattrctl initattr -p / 388 posix1e.acl_default</pre>
+</div>
+<p class="Pp">On the next mount of the root file system, the attributes will be
+ automatically started if <code class="Dv">UFS_EXTATTR_AUTOSTART</code> is
+ included in the kernel configuration, and ACLs will be enabled.</p>
+</section>
+<section class="Ss">
+<h2 class="Ss" id="Directory_Hashing"><a class="permalink" href="#Directory_Hashing">Directory
+ Hashing</a></h2>
+<dl class="Bl-tag">
+ <dt><code class="Cd">options UFS_DIRHASH</code></dt>
+ <dd>Implements a hash-based lookup scheme for directories in order to speed up
+ accesses to very large directories.</dd>
+</dl>
+</section>
+<section class="Ss">
+<h2 class="Ss" id="Extended_Attributes"><a class="permalink" href="#Extended_Attributes">Extended
+ Attributes</a></h2>
+<dl class="Bl-tag">
+ <dt><code class="Cd">options UFS_EXTATTR</code></dt>
+ <dd>Extended attributes allow the association of additional arbitrary metadata
+ with files and directories, which can be assigned and retrieved from
+ userland as well as from within the kernel; see
+ <a class="Xr">extattrctl(8)</a>.</dd>
+ <dt><code class="Cd">options UFS_EXTATTR_AUTOSTART</code></dt>
+ <dd>If this option is defined, <code class="Nm">ffs</code> will search for a
+ <span class="Pa">.attribute</span> subdirectory of the file system root
+ during the mount operation. If found, extended attribute support will be
+ automatically started for that file system.</dd>
+</dl>
+</section>
+<section class="Ss">
+<h2 class="Ss" id="GEOM-based_Journaling"><a class="permalink" href="#GEOM-based_Journaling">GEOM-based
+ Journaling</a></h2>
+<dl class="Bl-tag">
+ <dt><code class="Cd">options UFS_GJOURNAL</code></dt>
+ <dd>Implements a block level journaling of a UFS file system, which is for
+ both data and metadata. To enable this, create a
+ <a class="Xr">gjournal(8)</a> GEOM provider for a block device by using
+ the following command:
+ <p class="Pp"></p>
+ <div class="Bd Bd-indent"><code class="Nm">gjournal label</code>
+ <var class="Ar">da0</var></div>
+ <p class="Pp">In this example, <span class="Pa">/dev/da0</span> is used as
+ the target block device, and <span class="Pa">/dev/da0.journal</span> is
+ created. Then create a new file system by using
+ <a class="Xr">newfs(8)</a> with the block level journaling flag and
+ mount it:</p>
+ <p class="Pp"></p>
+ <div class="Bd Bd-indent"><code class="Nm">newfs</code>
+ <code class="Fl">-J</code> <var class="Ar">/dev/da0.journal</var></div>
+ <div class="Bd Bd-indent"><code class="Nm">mount</code>
+ <code class="Fl">-o</code> <code class="Cm">async</code>
+ <var class="Ar">/dev/da0.journal</var> <var class="Ar">/mnt</var></div>
+ <p class="Pp"><code class="Cm">async</code> option is not mandatory but
+ recommended for better performance because the journaling guarantees the
+ consistency of an <code class="Cm">async</code> mount.</p>
+ <p class="Pp">It is also possible to enable the block level journaling on an
+ existing file system. To do so, use <a class="Xr">gjournal(8)</a>
+ utility to label the underlying block device and
+ <a class="Xr">tunefs(8)</a> utility to enable the block level journaling
+ flag:</p>
+ <p class="Pp"></p>
+ <div class="Bd Bd-indent"><code class="Nm">gjournal label</code>
+ <var class="Ar">da0</var></div>
+ <div class="Bd Bd-indent"><code class="Nm">tunefs</code>
+ <code class="Fl">-J</code> <code class="Cm">enable</code>
+ <var class="Ar">/dev/da0.journal</var></div>
+ <div class="Bd Bd-indent"><code class="Nm">mount</code>
+ <code class="Fl">-o</code> <code class="Cm">async</code>
+ <var class="Ar">/dev/da0.journal</var> <var class="Ar">/mnt</var></div>
+ </dd>
+</dl>
+</section>
+<section class="Ss">
+<h2 class="Ss" id="sysctl_8_MIBs"><a class="permalink" href="#sysctl_8_MIBs"><a class="Xr">sysctl(8)</a>
+ MIBs</a></h2>
+<p class="Pp">The following <a class="Xr">sysctl(8)</a> MIBs are defined for use
+ with <code class="Nm">ffs</code>:</p>
+<dl class="Bl-hang">
+ <dt id="vfs.ffs.doasyncfree"><var class="Va">vfs.ffs.doasyncfree</var></dt>
+ <dd>Asynchronously write out modified i-node and indirect blocks upon
+ reallocating file system blocks to be contiguous. (Default: 1).</dd>
+ <dt id="vfs.ffs.doreallocblks"><var class="Va">vfs.ffs.doreallocblks</var></dt>
+ <dd>Enable support for the rearrangement of blocks to be contiguous. (Default:
+ 1).</dd>
+ <dt id="vfs.ffs.prttimechgs"><var class="Va">vfs.ffs.prttimechgs</var></dt>
+ <dd>Print a console message when timestamps for UFS1 filesystems are found to
+ be in the future and are changed to be the present time. (Default:
+ 0).</dd>
+</dl>
+</section>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
+<p class="Pp">The <code class="Nm">ffs</code> manual page first appeared in
+ <span class="Ux">FreeBSD 4.5</span>.</p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
+ ALSO</a></h1>
+<p class="Pp"><a class="Xr">quota(1)</a>, <a class="Xr">acl(3)</a>,
+ <a class="Xr">extattr(3)</a>, <a class="Xr">edquota(8)</a>,
+ <a class="Xr">extattrctl(8)</a>, <a class="Xr">fsck_ffs(8)</a>,
+ <a class="Xr">sysctl(8)</a>, <a class="Xr">tunefs(8)</a></p>
+<p class="Pp"><cite class="Rs"><span class="RsA">M. McKusick</span>,
+ <span class="RsA">W. Joy</span>, <span class="RsA">S. Leffler</span>, and
+ <span class="RsA">R. Fabry</span>, <span class="RsT">A Fast File System for
+ UNIX</span>, <i class="RsJ">ACM Transactions on Computer Systems</i>,
+ <span class="RsN">2</span>, <span class="RsV">3</span>,
+ <span class="RsP">181-197</span>, <span class="RsD">August
+ 1984</span>.</cite></p>
+<p class="Pp"><cite class="Rs"><span class="RsA">M. McKusick</span>,
+ <span class="RsT">Soft Updates: A Technique for Eliminating Most Synchronous
+ Writes in the Fast Filesystem</span>, <i class="RsJ">Proceedings of the
+ Freenix Track at the 1999 Usenix Annual Technical Conference</i>,
+ <span class="RsP">71-84</span>, <span class="RsD">June
+ 2000</span>.</cite></p>
+<p class="Pp"><cite class="Rs"><span class="RsA">M. McKusick</span> and
+ <span class="RsA">J. Roberson</span>, <span class="RsT">Journaled
+ Soft-updates</span>, <i class="RsJ">BSD Canada Conference 2010 (BSDCan)</i>,
+ <span class="RsD">May 2010</span>.</cite></p>
+</section>
+</div>
+<table class="foot">
+ <tr>
+ <td class="foot-date">February 24, 2026</td>
+ <td class="foot-os">FreeBSD 15.0</td>
+ </tr>
+</table>