MOUNT.NILFS2(8)
π MOUNT.NILFS2 π
okay bestie, pull up a chair, we're talking about mount.nilfs2, the System Manager's Manual girlie whose whole job is mount a NILFS2 file system. she's iconic, she's efficient, and she has OPINIONS about garbage collection. let's get into it β¨
β¨ SYNOPSIS β¨
no cap, here's how you summon her:
mount -t nilfs2 [-finrvw] [-o options [,...]] device dir
mount -t nilfs2 [-finrvw] [-o options [,...]] device | dir
mount.nilfs2 [-fnrvw] [-o options [,...]] device dir
mount.nilfs2 [-V]
π¦ DESCRIPTION π¦
so. mount.nilfs2 is here to attach a NILFS2 file system onto the directory dir you picked. she's not a solo act though β she's intended to be executed from mount(8), and the way that works is: she does the actual mount system call, and once that succeeds, she goes and invokes the garbage collector nilfs_cleanerd(8). teamwork, periodt. π«Ά
and the reverse? umount.nilfs2(8) shuts that garbage collector down before detaching the file system. clean exits only.
the standard command line interface is the first form:
mount -t nilfs2 [options] device dir
this tells the kernel to attach the NILFS2 file system on device at the directory dir. main character behaviour, honestly.
with the second form, the mount program tries to figure out a missing device or dir argument for you, by peeking at the /etc/fstab table. she's a detective π
the third form, which directly invokes mount.nilfs2, is also usable β because mount.nilfs2 maintains by herself the system mount state, like the list of mounted file systems described in /etc/mtab. lowkey impressive. however, the first or the second form is usually recommended, because some expansive options are not supported by the third form. sad but true π
π OPTIONS π
the full set of options used by an invocation of mount(8) gets determined like a lil recipe: first you extract the options from the fstab table, then you apply any options specified by the -o argument, and finally you apply a -r or -w option, when present. stack it up. π
see mount(8) for the full set of options. the commonly used ones are as follows, bestie:
-Vβ Output version. that's it, that's the whole job π-fβ Fakes mounting the file system, meaning the actual system call gets skipped. this option is used to add entries for devices that were mounted earlier with the-noption. it can also be used for invokingnilfs_cleanerd(8)skipped previously. fake it till you make it β¨-iβ Don't callmount.nilfs2. this disables garbage collection and handling of pseudo mount options.-nβ Mount without writing in/etc/mtab. this is necessary, for example, when/etcis on a read-only file system. sometimes you just don't want receipts π-rβ Mount the file system read-only. a synonym is-o ro.-vβ Verbose mode. she will talk.-wβ Mount the file system read/write. this is the default. a synonym is-o rw.-oβ Options are specified with a-oflag followed by a comma separated string of options. some of these options are only useful when they appear in the/etc/fstabfile. for standard filesystem options, seemount(8).
πΈ NILFS2 SPECIFIC MOUNT OPTIONS πΈ
these next ones are NILFS2-only, bestie β they all follow the -o flag. exclusive club, invite only π
barrier/nobarrierβ these options enable/disable (default is enabled) barrier writes for the block I/O to a lower device. the barrier write serves an important role to ensure consistency of filesystems after a system crash or power failure. NILFS2 uses this feature by default to assure the reliability. for devices not supporting the barrier write, it will be disabled automatically and a warning will be logged. so like, she tried her best πcp=checkpoint-numberβ specify thecheckpoint-numberof the snapshot to be mounted. checkpoints and snapshots are listed bylscp(1). only the checkpoints marked as snapshot are mountable with this option. note that the read-only mount option must be specified together. yes, together, they're a package deal πerrors=continue/errors=remount-ro/errors=panicβ define the behaviour when an error is encountered. (either ignore errors and just mark the file system erroneous and continue, or remount the file system read-only, or panic and halt the system.) the default isremount-ro. in earlier kernels than Linux 2.6.35,continuewas the default. glow-up era πpp=protection-periodβ specify theprotection-periodfor the cleaner daemon (in seconds).nilfs_cleanerdnever deletes recent checkpoints whose elapsed time from its creation is smaller thanprotection-period. she's protective, we love that π«Άnogcβ Disable garbage collection. the cleaner daemon will not be started. it can be started manually, but in that case it must also be stopped manually before unmounting. no take-backs, no autopilot πorder=relaxed/order=strictβ specify order semantics for file data. metadata is always written to follow the POSIX semantics about the order of filesystem operations. now the two moods:relaxedβ apply relaxed order semantics that allows modified data blocks to be written to disk without making a checkpoint if no metadata update is going. this mode is equivalent to the ordered data mode of the ext3 filesystem, except for the updates on data blocks still conserve atomicity. this will improve synchronous write performance for overwriting. this is the default mode. chill girl energy π§strictβ apply strict in-order semantics that preserves sequence of all file operations including overwriting of data blocks. that means, it is guaranteed that no overtaking of events occurs in the recovered file system after a crash. unlike journaling filesystems, NILFS2 does not write a same block twice to disk. so there is no significant performance degradation in comparison with the relaxed mode except for file overwriting. type A, no overtaking, ever π
norecoveryβ Disable recovery of the filesystem on mount. this disables every write access on the device for read-only mounts or snapshots. this option will fail for r/w mounts on an unclean volume. she said no thank you πdiscard/nodiscardβ these options enable/disable (default is disabled) the use of discard/TRIM commands. the discard/TRIM commands are sent to the underlying block device when blocks are freed. this is useful for SSD devices and sparse/thinly-provisioned LUNs. (since 2.6.34). spring cleaning for your SSD β¨
π₯ RETURN CODES π₯
the return codes of mount.nilfs2 conform to those of mount(8); the following codes could be returned (the bits can be ORed):
0β success π1β incorrect invocation or permissions2β system error (out of memory, cannot fork, no more loop devices)4β internal bug8β user interrupt16β problems writing or locking/etc/mtab32β mount failure64β some mount succeeded
π AUTHOR π
mount.nilfs2 is written by Ryusuke Konishi <konishi.ryusuke@gmail.com> for NILFS2, based on the mount program included in the util-linux package. giving credit where credit is due, always π
π AVAILABILITY π
mount.nilfs2 is part of the nilfs-utils package and is available from https://nilfs.sourceforge.io. go get her π¦
β SEE ALSO β
nilfs(8), mount(8), umount.nilfs2(8), nilfs_cleanerd(8), lscp(1).
and that's the whole vibe check, bestie π this was nilfs-utils version 2.3, dated Jan 2026, and it's giving β¨ System Manager's Manual β¨ β MOUNT.NILFS2(8), periodt. mwah π π
π¦ where this page comes from
- alpine 3.24: nilfs-utils-doc 2.3.0-r0 Β· GPL-2.0-or-later
- arch rolling: nilfs-utils 2.3.1-1 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- nixpkgs unstable: nilfs-utils 2.3.1
- Copyright (C) 2007-2012 Nippon Telegraph and Telephone Corporation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms