1MKFS.F2FS(8) System Manager's Manual MKFS.F2FS(8)
2
3
4
6 mkfs.f2fs - create an F2FS file system
7
9 mkfs.f2fs [ -a heap-based-allocation ] [ -c device ] [ -d debugging-
10 level ] [ -e extension-list ] [ -f ] [ -l volume-label ] [ -m ] [ -o
11 overprovision-ratio-percentage ] [ -O feature-list ] [ -q ] [ -R
12 root_owner ] [ -s #-of-segments-per-section ] [ -t nodiscard/discard ]
13 [ -w specific sector_size for target sectors ] [ -z #-of-sections-per-
14 zone ] device [sectors]
15
17 mkfs.f2fs is used to create a f2fs file system (usually in a disk par‐
18 tition). device is the special file corresponding to the device (e.g.
19 /dev/sdXX). sectors is optionally given for specifing the filesystem
20 size.
21
22 The exit code returned by mkfs.f2fs is 0 on success and 1 on failure.
23
25 -a heap-based-allocation
26 Specify 1 or 0 to enable/disable heap based block allocation
27 policy. If the value is equal to 1, each of active log areas
28 are initially assigned separately according to the whole volume
29 size. The default value is 1.
30
31 -c device
32 Build f2fs with this device additionally, so that user can see
33 all the devices as one big volume.
34
35 -d debug-level
36 Specify the level of debugging options. The default number is
37 0, which shows basic debugging messages.
38
39 -e extension-list
40 Specify a file extension list in order f2fs to treat them as
41 cold files. The data of files having those extensions will be
42 stored to the cold log. The default list includes most of mul‐
43 timedia file extensions such as jpg, gif, mpeg, mkv, and so on.
44
45 -f Force overwrite when an existing filesystem is detected on the
46 device. By default, mkfs.f2fs will not write to the device if
47 it suspects that there is a filesystem or partition table on the
48 device already.
49
50 -l volume-label
51 Specify the volume label to the partition mounted as F2FS.
52
53 -m Specify f2fs filesystem to supports the block zoned feature.
54 Without it, the filesystem isn't supports the feature.
55
56 -o overprovision-ratio-percentage
57 Specify the percentage over the volume size for overprovision
58 area. This area is hidden to users, and utilized by F2FS
59 cleaner. If not specified, the best number will be assigned
60 automatically accoring to the partition size.
61
62 -O feature-list
63 Specify a feature list like feature1[feature2,feature3,...] in
64 order f2fs filesystem will supports. e.g "encrypt" and so on.
65
66 -q Quiet mode. With it, mkfs.f2fs does not show any messages
67 include the basic messages.
68
69 -R Give root_owner option for initial uid/gid assignment. Default
70 is set by getuid()/getgid(), and assigned by "-R $uid:$gid".
71
72 -s #-of-segments-per-section
73 Specify the number of segments per section. A section consists
74 of multiple consecutive segments, and is the unit of garbage
75 collection. The default number is 1, which means one segment is
76 assigned to a section.
77
78 -t nodiscard/discard
79 Specify 1 or 0 to enable/disable discard policy. If the value
80 is equal to 1, discard policy is enabled, otherwise is disable.
81 The default value is 1.
82
83 -wsector-size
84 Specify the sector size in bytes along with given target sec‐
85 tors. Without it, the sectors will be calculated by device sec‐
86 tor size.
87
88 -z #-of-sections-per-zone
89 Specify the number of sections per zone. A zone consists of mul‐
90 tiple sections. F2FS allocates segments for active logs with
91 separated zones as much as possible. The default number is 1,
92 which means a zone consists of one section.
93
94
95 AUTHOR
96 This version of mkfs.f2fs has been written by Jaegeuk Kim
97 <jaegeuk.kim@samsung.com>.
98
100 mkfs.f2fs is available from git://git.kernel.org/pub/scm/linux/ker‐
101 nel/git/jaegeuk/f2fs-tools.git.
102
104 mkfs(8), fsck.f2fs(8), dump.f2fs(8), defrag.f2fs(8), resize.f2fs(8),
105 sload.f2fs(8).
106
107
108
109 MKFS.F2FS(8)