FFS(7)
πΈ NAME πΈ
okay so bestie, meet ffs β the Berkeley fast file system, and yes, this whole manual page is literally FFS(7). She stores file system data onto a disk device, she has been optimized over the years for speed and reliability, and she is the default FreeBSD file system. main character energy, honestly π
β¨ SYNOPSIS β¨
the setup vibe is giving kernel config realness:
In the kernel configuration file:
options FFS
options QUOTA
options SOFTUPDATES
options SUIDDIR
options UFS_ACL
options UFS_DIRHASH
options UFS_EXTATTR
options UFS_EXTATTR_AUTOSTART
options UFS_GJOURNAL
In fstab(5):
/dev/disk0a /mnt ufs rw 1 1
π DESCRIPTION π
so basically, the Berkeley fast file system provides facilities to store file system data onto a disk device. ffs has been optimized over the years for speed and reliability, and it is the default FreeBSD file system. no cap, she's been around and she ate π«Ά
π Quotas π
options QUOTA β 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 quota option; see quota(1) and edquota(8).
π¦ Soft Updates π¦
options SOFTUPDATES β 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.
to create a new file system with the soft updates enabled, use newfs(8) command:
newfs -U fs
fs can be either a mount point listed in fstab(5) (e.g., /usr), or a disk device (e.g., /dev/da0a).
it is possible to enable soft updates on an unmounted file system by using tunefs(8) command:
tunefs -n enable fs
soft updates can also add journaling that reduces the time spent by fsck_ffs(8) cleaning up a filesystem after a crash from several minutes to a few seconds. the journal is placed in an inode named .sujournal, and is kept as a circular log of segments containing records that describe metadata operations.
to create a new file system with both the soft updates and soft updates journaling enabled, use the following command:
newfs -j fs
this runs tunefs(8) command after newfs(8) command with -U flag enabled. it is possible to enable soft updates journaling on an unmounted file system by using tunefs(8) command:
tunefs -j enable fs
this flag automatically enables the soft updates feature when it is not enabled.
note that thistunefs(8)command will fail if a file.sujournalalready exists before enabling the soft updates journaling. okay so that's the warning, bestie β do not ignore it π
π File Ownership Inheritance π
options SUIDDIR β 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 suiddir option to inherit the ownership of its directory, i.e., βif it's my directory, it must be my file.β
π Access Control Lists π
options UFS_ACL β access control lists allow the association of fine-grained discretionary access control information with files and directories. this option requires the presence of the UFS_EXTATTR option, and it is recommended that UFS_EXTATTR_AUTOSTART is included as well, so that ACLs are enabled atomically upon mounting the file system.
in order to enable support for ACLs, two extended attributes must be available in the EXTATTR_NAMESPACE_SYSTEM namespace: posix1e.acl_access, which holds the access ACL, and posix1e.acl_default, 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 βExtended Attributesβ for more details.
mkdir -p /.attribute/system
cd /.attribute/system
extattrctl initattr -p / 388 posix1e.acl_access
extattrctl initattr -p / 388 posix1e.acl_default
on the next mount of the root file system, the attributes will be automatically started if UFS_EXTATTR_AUTOSTART is included in the kernel configuration, and ACLs will be enabled. slay β¨
π§ Directory Hashing π§
options UFS_DIRHASH β implements a hash-based lookup scheme for directories in order to speed up accesses to very large directories.
π Extended Attributes π
options UFS_EXTATTR β 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 extattrctl(8).
options UFS_EXTATTR_AUTOSTART β if this option is defined, ffs will search for a .attribute subdirectory of the file system root during the mount operation. if found, extended attribute support will be automatically started for that file system.
π₯ GEOM-based Journaling π₯
options UFS_GJOURNAL β implements a block level journaling of a UFS file system, which is for both data and metadata. to enable this, create a gjournal(8) GEOM provider for a block device by using the following command:
gjournal label da0
in this example, /dev/da0 is used as the target block device, and /dev/da0.journal is created. then create a new file system by using newfs(8) with the block level journaling flag and mount it:
newfs -J /dev/da0.journal
mount -o async /dev/da0.journal /mnt
async option is not mandatory but recommended for better performance because the journaling guarantees the consistency of an async mount.
it is also possible to enable the block level journaling on an existing file system. to do so, use gjournal(8) utility to label the underlying block device and tunefs(8) utility to enable the block level journaling flag:
gjournal label da0
tunefs -J enable /dev/da0.journal
mount -o async /dev/da0.journal /mnt
π sysctl(8) MIBs π
the following sysctl(8) MIBs are defined for use with ffs:
vfs.ffs.doasyncfreeβ asynchronously write out modified i-node and indirect blocks upon reallocating file system blocks to be contiguous. (Default: 1).vfs.ffs.doreallocblksβ enable support for the rearrangement of blocks to be contiguous. (Default: 1).vfs.ffs.prttimechgsβ 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).
π HISTORY π
the ffs manual page first appeared in FreeBSD 4.5. a little icon moment in history, honestly β
π SEE ALSO π
also the references, because we respect the academic baddies:
- M. McKusick, W. Joy, S. Leffler, and R. Fabry, βA Fast File System for UNIXβ, ACM Transactions on Computer Systems, 2, 3, 181-197, August 1984.
- M. McKusick, βSoft Updates: A Technique for Eliminating Most Synchronous Writes in the Fast Filesystemβ, Proceedings of the Freenix Track at the 1999 Usenix Annual Technical Conference, 71-84, June 2000.
- M. McKusick and J. Roberson, βJournaled Soft-updatesβ, BSD Canada Conference 2010 (BSDCan), May 2010.
and that's the whole vibe, bestie π«Ά this page is from Debian, dated January 19, 2025, for FFS(7) β periodt π
β¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- Copyright (c) 2001 Networks Associates Technology, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms