1MKFS.F2FS(8)                System Manager's Manual               MKFS.F2FS(8)
2
3
4

NAME

6       mkfs.f2fs - create an F2FS file system
7

SYNOPSIS

9       mkfs.f2fs  [  -a heap-based-allocation ] [ -c device-list ] [ -d debug-
10       level ] [ -e extension-list ] [ -E extension-list ] [ -f ] [ -g ] [  -i
11       ] [ -l volume-label ] [ -m ] [ -o overprovision-ratio-percentage ] [ -O
12       feature-list ] [ -C encoding:flags ] [ -q ] [ -r ] [ -R root_owner ]  [
13       -s  #-of-segments-per-section  ]  [  -S ] [ -t nodiscard/discard ] [ -T
14       timestamp ] [ -w wanted-sector-size ] [ -z #-of-sections-per-zone  ]  [
15       -V ] device [sectors]
16

DESCRIPTION

18       mkfs.f2fs  is used to create a f2fs file system (usually in a disk par‐
19       tition).  device is the special file corresponding to the device  (e.g.
20       /dev/sdXX).   sectors  is optionally given for specifing the filesystem
21       size.
22
23       The exit code returned by mkfs.f2fs is 0 on success and 1 on failure.
24

OPTIONS

26       -a heap-based-allocation
27              Specify 1 or 0 to enable/disable  heap  based  block  allocation
28              policy.   If  the  value is equal to 1, each of active log areas
29              are initially assigned separately according to the whole  volume
30              size.  The default value is 1.
31
32       -c device-list
33              Build  f2fs  with  these  additional comma separated devices, so
34              that the user can see all the devices as one big  volume.   Sup‐
35              ports up to 7 devices except meta device.
36
37       -d debug-level
38              Specify  the  level of debugging options.  The default number is
39              0, which shows basic debugging messages.
40
41       -e extension-list
42              Specify a list of file extensions that f2fs will treat  as  cold
43              files.   The  data of files with those extensions will be stored
44              in the cold log.  The default list includes most of the multime‐
45              dia file extensions such as jpg, gif, mpeg, mkv, and so on.
46
47       -E extension-list
48              Specify  a  list  of file extensions that f2fs will treat as hot
49              files.  The data of files with those extensions will  be  stored
50              in  the hot log.  The default list includes database file exten‐
51              sions, such as db.
52
53       -f     Force overwrite when an existing filesystem is detected  on  the
54              device.   By  default, mkfs.f2fs will not write to the device if
55              it suspects that there is a filesystem or partition table on the
56              device already.
57
58       -g     Add default Android options.
59
60       -i     Enable extended node bitmap.  -l volume-label Specify the volume
61              label to the partition mounted as F2FS.
62
63       -m     Specify f2fs filesystem to supports  the  block  zoned  feature.
64              Without it, the filesystem doesn't support the feature.
65
66       -o overprovision-ratio-percentage
67              Specify  the percentage of the volume that will be used as over‐
68              provision area.  This area is hidden to users, and  utilized  by
69              F2FS cleaner. If not specified, the best number will be assigned
70              automatically according to the partition size.
71
72       -O feature-list
73              Set additional features for the filesystem. Features  are  comma
74              separated,  and the flag can be repeated. The following features
75              are supported:
76
77                   encrypt     Enable support for filesystem level encryption.
78
79                   extra_attr  Enable extra attr feature, required for some of
80                               the other features.
81
82                   project_quota
83                               Enable  project  ID  tracking. This is used for
84                               projet quota accounting. Requires extra attr.
85
86                   inode_checksum
87                               Enable inode checksum. Requires extra attr.
88
89                   flexible_inline_xattr
90                               Enable flexible inline  xattr.  Requires  extra
91                               attr.
92
93                   quota       Enable quotas.
94
95                   inode_crtime
96                               Enable  inode  creation  time feature. Requires
97                               extra attr.
98
99                   lost_found  Enable lost+found feature.
100
101                   verity      Reserved feature.
102
103                   sb_checksum Enable superblock checksum.
104
105                   casefold    Enable casefolding support in  the  filesystem.
106                               Optional flags can be passed with -C
107
108                   compression Enable  support  for  filesystem level compres‐
109                               sion. Requires extra attr.
110
111       -C encoding:flags
112              Support casefolding with  a  specific  encoding,  with  optional
113              comma separated flags.
114
115                   encoding:
116
117                               utf8        Use UTF-8 for casefolding.
118                   flags:
119
120                               strict      This  flag  specifies  that invalid
121                                           strings should be rejected  by  the
122                                           filesystem.  Default is disabled.
123
124       -q     Quiet  mode.   With  it,  mkfs.f2fs  does not show any messages,
125              including the basic messages.
126
127       -r     Sets the checkpointing srand seed to 0.
128
129       -R     Give root_owner option for initial uid/gid assignment.   Default
130              is set by getuid()/getgid(), and assigned by "-R $uid:$gid".
131
132       -s #-of-segments-per-section
133              Specify  the  number of segments per section. A section consists
134              of multiple consecutive segments, and is  the  unit  of  garbage
135              collection.  The default number is 1, which means one segment is
136              assigned to a section.
137
138       -S     Enable sparse mode.
139
140       -t 1/0 Specify 1 or 0 to enable  or  disable  discard  policy,  respec‐
141              tively.  The default value is 1.
142
143       -T timestamp
144              Set  inodes  times to a given timestamp. By default, the current
145              time will be used.  This behaviour corresponds to the value -1.
146
147       -w wanted-sector-size
148              Specify the sector size in bytes.  Without it, the sectors  will
149              be calculated by device sector size.
150
151       -z #-of-sections-per-zone
152              Specify the number of sections per zone. A zone consists of mul‐
153              tiple sections.  F2FS allocates segments for  active  logs  with
154              separated  zones  as much as possible.  The default number is 1,
155              which means a zone consists of one section.
156
157       sectors
158              Number of sectors. Default is determined by device size.
159
160       -V     Print the version number and exit.
161

AUTHOR

163       This  version  of  mkfs.f2fs  has   been   written   by   Jaegeuk   Kim
164       <jaegeuk.kim@samsung.com>.
165

AVAILABILITY

167       mkfs.f2fs  is  available  from  git://git.kernel.org/pub/scm/linux/ker‐
168       nel/git/jaegeuk/f2fs-tools.git.
169

SEE ALSO

171       mkfs(8), fsck.f2fs(8),  dump.f2fs(8),  defrag.f2fs(8),  resize.f2fs(8),
172       sload.f2fs(8).
173
174
175
176                                                                  MKFS.F2FS(8)
Impressum