OS Manuals

/usr/bin/mkfs.xfs

XFS filesystem utilities

From xfsprogs-5.10 5.10.0-r48 (enterprise-packages), captured 2026-11-08 by running mkfs.xfs --help (exit 1). permalink

/usr/bin/mkfs.xfs: invalid option -- '-'
unknown option --
Usage: mkfs.xfs
/* blocksize */		[-b size=num]
/* config file */	[-c options=xxx]
/* metadata */		[-m crc=0|1,finobt=0|1,uuid=xxx,rmapbt=0|1,reflink=0|1,
			    inobtcnt=0|1,bigtime=0|1]
/* data subvol */	[-d agcount=n,agsize=n,file,name=xxx,size=num,
			    (sunit=value,swidth=value|su=num,sw=num|noalign),
			    sectsize=num
/* force overwrite */	[-f]
/* inode size */	[-i perblock=n|size=num,maxpct=n,attr=0|1|2,
			    projid32bit=0|1,sparse=0|1]
/* no discard */	[-K]
/* log subvol */	[-l agnum=n,internal,size=num,logdev=xxx,version=n
			    sunit=value|su=num,sectsize=num,lazy-count=0|1]
/* label */		[-L label (maximum 12 characters)]
/* naming */		[-n size=num,version=2|ci,ftype=0|1]
/* no-op info only */	[-N]
/* prototype file */	[-p fname]
/* quiet */		[-q]
/* realtime subvol */	[-r extsize=num,size=num,rtdev=xxx]
/* sectorsize */	[-s size=num]
/* version */		[-V]
			devicename
<devicename> is required unless -d name=xxx is given.
<num> is xxx (bytes), xxxs (sectors), xxxb (fs blocks), xxxk (xxx KiB),
      xxxm (xxx MiB), xxxg (xxx GiB), xxxt (xxx TiB) or xxxp (xxx PiB).
<value> is xxx (512 byte blocks).
Options (16)
OptionDescriptionSource
-c configuration_file_optionThis option specifies the files that mkfs configuration will be obtained from.man
-b block_size_options[Section Name: [block]](#Section)man
-m global_metadata_options[Section Name: [metadata]](#Section~2)man
-d data_section_options[Section Name: [data]](#Section~3)man
-fForce overwrite when an existing filesystem is detected on the device.man
-i inode_options[Section Name: [inode]](#Section~4)man
-l log_section_options[Section Name: [log]](#Section~5)man
-n naming_options[Section Name: [naming]](#Section~6)man
-p protofileIf the optional -p protofile argument is given, mkfs.xfs uses protofile as a prototype file and takes its directions from that file.man
-qQuiet option.man
-r realtime_section_options[Section Name: [realtime]](#Section~7)man
-s sector_size_options[Section Name: [sector]](#Section~8)man
-L labelSet the filesystem label.man
-NCauses the file system parameters to be printed out without really creating the file system.man
-KDo not attempt to discard blocks at mkfs time.man
-VPrints the version number and exits.man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.