blob: 0e54fe83b831bdb92ff08cbd1ef18640cc0a3b0e [file] [log] [blame]
Jaegeuk Kime69e4372013-01-25 17:20:16 +09001.\" Copyright (c) 2012 Samsung Electronics Co., Ltd.
2.\" http://www.samsung.com/
3.\" Written by Jaegeuk Kim <jaegeuk.kim@samsung.com>
Jaegeuk Kim036d45e2012-10-26 21:56:34 +09004.\"
Jaegeuk Kim41b1de62015-12-22 16:14:36 -08005.TH MKFS.F2FS 8
Jaegeuk Kim036d45e2012-10-26 21:56:34 +09006.SH NAME
7mkfs.f2fs \- create an F2FS file system
8.SH SYNOPSIS
9.B mkfs.f2fs
10[
11.B \-a
12.I heap-based-allocation
13]
14[
15.B \-l
16.I volume-label
17]
18[
19.B \-o
20.I overprovision-ratio-percentage
21]
22[
23.B \-s
Jaegeuk Kim6600bcf2015-08-10 10:57:23 -070024.I #-of-segments-per-section
Jaegeuk Kim036d45e2012-10-26 21:56:34 +090025]
26[
27.B \-z
28.I #-of-sections-per-zone
29]
Jaegeuk Kime69e4372013-01-25 17:20:16 +090030[
31.B \-e
32.I extenstion-list
33]
34[
35.B \-d
36.I debugging-level
37]
Jaegeuk Kim036d45e2012-10-26 21:56:34 +090038.I device
Jaegeuk Kim41b1de62015-12-22 16:14:36 -080039.I [sectors]
Jaegeuk Kim036d45e2012-10-26 21:56:34 +090040.SH DESCRIPTION
41.B mkfs.f2fs
42is used to create a f2fs file system (usually in a disk partition).
43\fIdevice\fP is the special file corresponding to the device (e.g.
44\fI/dev/sdXX\fP).
Jaegeuk Kim41b1de62015-12-22 16:14:36 -080045\fIsectors\fP is optionally given for specifing the filesystem size.
Jaegeuk Kim036d45e2012-10-26 21:56:34 +090046.PP
47The exit code returned by
48.B mkfs.f2fs
49is 0 on success and 1 on failure.
50.SH OPTIONS
51.TP
52.BI \-a " heap-based-allocation"
53Specify 1 or 0 to enable/disable heap based block allocation policy.
54If the value is equal to 1, each of active log areas are initially
55assigned separately according to the whole volume size.
56The default value is 1.
57.TP
58.BI \-l " volume-label"
59Specify the volume label to the partition mounted as F2FS.
60.TP
61.BI \-o " overprovision-ratio-percentage"
62Specify the percentage over the volume size for overprovision area. This area
Jaegeuk Kimd464f092015-09-23 15:20:49 -070063is hidden to users, and utilized by F2FS cleaner. If not specified, the best
64number will be assigned automatically accoring to the partition size.
Jaegeuk Kim036d45e2012-10-26 21:56:34 +090065.TP
Jaegeuk Kim6600bcf2015-08-10 10:57:23 -070066.BI \-s " #-of-segments-per-section"
67Specify the number of segments per section. A section consists of
Jaegeuk Kim036d45e2012-10-26 21:56:34 +090068multiple consecutive segments, and is the unit of garbage collection.
Jaegeuk Kim6600bcf2015-08-10 10:57:23 -070069The default number is 1, which means one segment is assigned to a section.
Jaegeuk Kim036d45e2012-10-26 21:56:34 +090070.TP
71.BI \-z " #-of-sections-per-zone"
72Specify the number of sections per zone. A zone consists of multiple sections.
73F2FS allocates segments for active logs with separated zones as much as possible.
74The default number is 1, which means a zone consists of one section.
Jaegeuk Kime69e4372013-01-25 17:20:16 +090075.TP
76.BI \-e " extension-list"
77Specify a file extension list in order f2fs to treat them as cold files.
78The data of files having those extensions will be stored to the cold log.
79The default list includes most of multimedia file extensions such as jpg, gif,
80mpeg, mkv, and so on.
81.TP
82.BI \-d " debug-level"
83Specify the level of debugging options.
84The default number is 0, which shows basic debugging messages.
85.TP
Jaegeuk Kim036d45e2012-10-26 21:56:34 +090086.SH AUTHOR
87This version of
88.B mkfs.f2fs
89has been written by Jaegeuk Kim <jaegeuk.kim@samsung.com>.
90.SH AVAILABILITY
91.B mkfs.f2fs
Jaegeuk Kime69e4372013-01-25 17:20:16 +090092is available from git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git.
Jaegeuk Kim036d45e2012-10-26 21:56:34 +090093.SH SEE ALSO
Jaegeuk Kim5c47dec2015-12-22 15:55:34 -080094.BR mkfs (8),
95.BR fsck.f2fs(8),
96.BR dump.f2fs(8),
Jaegeuk Kim58748712015-12-08 16:05:09 -080097.BR defrag.f2fs(8),
Jaegeuk Kimde166ee2015-12-09 16:18:44 -080098.BR resize.f2fs(8),
99.BR sload.f2fs(8).