MKFS.NILFS2(8)
β¨ MKFS.NILFS2 β¨
okay bestie, welcome to the mkfs.nilfs2(8) page β it's a System Manager's Manual situation, section 8, and it's literally all about making NILFS2 filesystems. let's get into it π
πΈ NAME πΈ
mkfs.nilfs2 β create a NILFS2 filesystem
π SYNOPSIS π
mkfs -t nilfs2 [ -b block-size ] [ -B blocks-per-segment ] [ -c ] [ -f ]
[ -K ] [ -L volume-label ] [ -m reserved-segments-percentage ] [ -n ] [
-O feature[,...] ] [ -h ] [ -q ] [ -v ] [ -V ] device
mkfs.nilfs2 [ -b block-size ] [ -B blocks-per-segment ] [ -c ] [ -f ] [
-K ] [ -L volume-label ] [ -m reserved-segments-percentage ] [ -n ] [ -O
feature[,...] ] [ -h ] [ -q ] [ -v ] [ -V ] device
π DESCRIPTION π
mkfs.nilfs2 is the girlboss that creates a nilfs2 filesystem β usually on a disk partition, no cap. device is the special file that corresponds to the device (like /dev/sdXX, iykyk). And fr fr, most of the time you're not even calling her directly β she gets invoked from the mkfs(8) front-end program. group project energy π«Ά
The exit code mkfs.nilfs2 hands back is 0 on success and 1 on failure. periodt.
β¨ OPTIONS β¨
-bblock-size β sets the size of blocks, in bytes. the valid block sizes are1024,2048,4096,8192bytes, ... and the maximum is capped at the system page size. for most machines that's4096bytes. default block size? also4096bytes. iconic consistency π«-Bblocks-per-segment β sets the number of blocks in a segment, where the segment (also called a full segment, cute) is the allocation unit of disk space in NILFS. this parameter gives you the size of the segment, which consequently decides how many segments get aligned in the specified device. default is2048blocks per segment (=8MBwith4KBblocks). math ate π₯-cβ check the device for bad blocks before building the filesystem. safety first bestie π§-fβ force overwrite when there's already an existing filesystem detected on the device. by defaultmkfs.nilfs2will not write to the device if she suspects there's already a filesystem on it. she's polite like that π-hβ display the help message and exit. π«Ά-Kβ Keep, meaning do not attempt to discard blocks at mkfs time. (fun fact: discarding blocks initially is useful on solid state drives and on sparse / thinly-provisioned storage. so like, only skip it if you know.) π-Lnew-volume-label β set the volume label for the filesystem to new-volume-label. max length of the volume label is80bytes. no essays in the label please π-mreserved-segments-percentage β specify the percentage of the segments reserved for garbage collection. default percentage is5%. π-nβ causemkfs.nilfs2to not actually create a filesystem, but instead display what it would be do if it were to create a filesystem. window shopping mode π-Ofeature[,...] β create a filesystem with the given features (filesystem options), overriding the default filesystem options.
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. and the pseudo-filesystem feature "none" will clear all filesystem features. choose your own adventure β¨
block_countβ Enable block count per checkpoint.
-qβ quiet execution. useful ifmkfs.nilfs2is run in a script. shhh π€«-vβ verbose execution. tell me everything π£οΈ-Vβ print the version number ofmkfs.nilfs2and exit. π
β οΈ heads up bestie:-fis the one that actually overwrites an existing filesystem. by default she won't touch a device she thinks already has a filesystem on it, so don't go swinging-faround unless you mean it. π
π AUTHOR π
This version of mkfs.nilfs2 has been written by Ryusuke Konishi <konishi.ryusuke@gmail.com>. absolute legend, we stan π
π AVAILABILITY π
mkfs.nilfs2 is part of the nilfs-utils package and is available from https://nilfs.sourceforge.io. go get her π¦
π SEE ALSO π
and that's the whole page, bestie!! this one's from nilfs-utils version 2.3, dated Jan 2026 β so you know it's fresh β¨ mwah, go make some filesystems responsibly πππ«Ά
π¦ 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