nilfs-utils/man/mkfs.nilfs2.8
Ryusuke Konishi dd2d0df4f4 man: update version and date for release 2.3
Update the version number to 2.3 and the date to Jan 2026 in the manual
pages for mkfs.nilfs2, mount.nilfs2, nilfs, nilfs_cleanerd,
nilfs_cleanerd.conf, nilfs-resize, nilfs-tune, and umount.nilfs2.

This synchronizes the version information across all manual pages in
preparation for the upcoming release.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2026-01-21 20:53:35 +09:00

197 lines
3.6 KiB
Groff

.\" Copyright (C) 2007-2012 Nippon Telegraph and Telephone Corporation.
.\" Written by Ryusuke Konishi <konishi.ryusuke@gmail.com>
.\"
.TH MKFS.NILFS2 8 "Jan 2026" "nilfs-utils version 2.3"
.SH NAME
mkfs.nilfs2 \- create a NILFS2 filesystem
.SH SYNOPSIS
.B "mkfs \-t nilfs2"
[
.B \-b
.I block-size
]
[
.B \-B
.I blocks-per-segment
]
[
.B \-c
]
[
.B \-f
]
[
.B \-K
]
[
.B \-L
.I volume-label
]
[
.B \-m
.I reserved-segments-percentage
]
[
.B \-n
]
[
.B \-O
.IR feature [,...]
]
[
.B \-h
]
[
.B \-q
]
[
.B \-v
]
[
.B \-V
]
.I device
.sp
.B mkfs.nilfs2
[
.B \-b
.I block-size
]
[
.B \-B
.I blocks-per-segment
]
[
.B \-c
]
[
.B \-f
]
[
.B \-K
]
[
.B \-L
.I volume-label
]
[
.B \-m
.I reserved-segments-percentage
]
[
.B \-n
]
[
.B \-O
.IR feature [,...]
]
[
.B \-h
]
[
.B \-q
]
[
.B \-v
]
[
.B \-V
]
.I device
.SH DESCRIPTION
.B mkfs.nilfs2
is used to create a nilfs2 filesystem (usually in a disk partition).
\fIdevice\fP is the special file corresponding to the device (e.g.
\fI/dev/sdXX\fP). Usually \fBmkfs.nilfs2\fP is invoked from the
\fBmkfs\fP(8) front-end program.
.PP
The exit code returned by
.B mkfs.nilfs2
is 0 on success and 1 on failure.
.SH OPTIONS
.TP
.BI \-b " block-size"
Specify the size of blocks in bytes. The valid block size is 1024,
2048, 4096, 8192 bytes, ..., and the maximum block size is restricted
to the system page size. For most machines, it is 4096 bytes. The
default block size is 4096 bytes.
.TP
.BI \-B " blocks-per-segment"
Specify the number of blocks in a segment, where the segment (also
called full segment) is an allocation unit of disk space of NILFS.
This parameter gives the size of segment and consequently determines
how many segments are aligned in the specified device. The default
number of blocks per segment is 2048 (= 8MB with 4KB blocks).
.TP
.B \-c
Check the device for bad blocks before building the filesystem.
.TP
.B \-f
Force overwrite when an existing filesystem is detected on the device.
By default,
.B mkfs.nilfs2
will not write to the device if it suspects that there is a filesystem
on the device already.
.TP
.B \-h
Display help message and exit.
.TP
.BI \-K
Keep, do not attempt to discard blocks at mkfs time (discarding blocks
initially is useful on solid state drives and sparse /
thinly-provisioned storage).
.TP
.BI \-L " new-volume-label"
Set the volume label for the filesystem to
.IR new-volume-label\fP.
The maximum length of the volume label is 80 bytes.
.TP
.BI \-m " reserved-segments-percentage"
Specify the percentage of the segments reserved for garbage
collection. The default percentage is 5%.
.TP
.B \-n
Cause
.B mkfs.nilfs2
to not actually create a filesystem, but display
what it would be do if it were to create a filesystem.
.TP
.B "\-O \fIfeature\fR[,...]"
Create a filesystem with the given features (filesystem options),
overriding the default filesystem options.
.sp
The filesystem feature set is comprised of a list of features, separated
by commas, that are to be enabled. To disable a feature, simply
prefix the feature name with a caret ('^') character. The
pseudo-filesystem feature "none" will clear all filesystem features.
.RS
.TP
.B block_count
Enable block count per checkpoint.
.RE
.TP
.B \-q
Quiet execution. Useful if
.B mkfs.nilfs2
is run in a script.
.TP
.B \-v
Verbose execution.
.TP
.B \-V
Print the version number of
.B mkfs.nilfs2
and exit.
.SH AUTHOR
This version of
.B mkfs.nilfs2
has been written by Ryusuke Konishi <konishi.ryusuke@gmail.com>.
.SH AVAILABILITY
.B mkfs.nilfs2
is part of the nilfs-utils package and is available from
https://nilfs.sourceforge.io.
.SH SEE ALSO
.BR nilfs (8),
.BR mkfs (8),
.BR badblocks (8).