Langue: en

Autres versions - même langue

Version: May 2008 (debian - 07/07/09)

Section: 8 (Commandes administrateur)


mount.nilfs2 - mount a NILFS2 file system


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 serves to attach a NILFS2 file system on the specified directory dir. It is intended to be executed from mount(8), and will invoke the garbage collector nilfs_cleanerd(8) after an actual mount system call has succeeded. Conversely, umount.nilfs2(8) will shutdown the garbage collector before detaching the file system.

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. With the second form, the mount program tries to find out a missing device or dir argument from the /etc/fstab table.

The third form, which directly invokes mount.nilfs2, is also usable since mount.nilfs2 maintains by itself the system mount state such as the list of mounted file systems described in /etc/mtab. Howerver, the first or the second form is usually recommended because some expansive options are not supported by the third form.


The full set of options used by an invocation of mount(8) is determined by extracting the options from the fstab table, then applying any options specified by the -o argument, and finally applying a -r or -w option, when present.

See mount(8) for the full set of options. Commonly used options are as follows:

Fakes mounting the file system, meaning that the actual system call will be skipped. This option is used to add entries for devices that were mounted earlier with the -n option. It can also be used for invoking nilfs_cleanerd(8) skipped previously.
Don't call mount.nilfs2. Useful to perform NILFS2 without the garbage collector.
Mount without writing in /etc/mtab. This is necessary for example when /etc is on a read-only file system. With this option, invocation of nilfs_cleanerd(8) is skipped. To add entries to mtab and invoke the garbage collector later, the -f option is available.
Mount the file system read-only. A synonym is "-o ro".
Verbose mode.
Mount the file system read/write. This is the default. A synonym is "-o rw".
Options are specified with a -o flag followed by a comma separated string of options. Some of these options are only useful when they appear in the /etc/fstab file. For standard filesystem options, see mount(8).


The following options apply only to the NILFS2 filesystem. They all follow the -o flag.
barrier=on / barrier=off
Define whether applying 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 is designed so as to properly issue the barrier to assure the reliability, and enables this option by default. For devices not supporting the barrier write, it will be disabled automatically and a warning will be logged.
Specify the checkpoint-number of the snapshot to be mounted. Checkpoints and snapshots are listed by lscp(1). Only the checkpoints marked as snapshot are mountable with this option. Note that the read-only mount option must be specified together.
errors=continue / errors=remount-ro / errors=panic
Define the behaviour when an error is encountered. (Eigher 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 is continue.
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.
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.
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.


The return codes of mount.nilfs2 conform to those of mount(8); the following codes could be returned (the bits can be ORed):
incorrect invocation or permissions
system error (out of memory, cannot fork, no more loop devices)
internal bug
user interrupt
problems writing or locking /etc/mtab
mount failure
some mount succeeded


mount.nilfs2 is written by Ryusuke Konishi <> for NILFS2, based on the mount program included in the util-linux package.


mount.nilfs2 is part of the nilfs-utils package and is available from


nilfs(8), mount(8), umount.nilfs2(8), nilfs_cleanerd(8), lscp(1).