@@ -150,6 +150,9 @@ OPTIONS
150
150
Populate the toplevel subvolume with files from *rootdir *. This does not
151
151
require root permissions to write the new files or to mount the filesystem.
152
152
153
+ Directories can be created as subvolumes, see also option *--subvol *.
154
+ Hardlinks are detected and created in the filesystem image.
155
+
153
156
.. note ::
154
157
This option may enlarge the image or file to ensure it's big enough to
155
158
contain the files from *rootdir *. Since version 4.14.1 the filesystem size is
@@ -160,6 +163,10 @@ OPTIONS
160
163
*no * (the default), *zstd *, *lzo * or *zlib *. The optional value *level * is a
161
164
compression level, 1..15 for *zstd *, 1..9 for *zlib *.
162
165
166
+ It is recommended to use the highest level to achieve maximum space savings.
167
+ Compression at mkfs time is not as constrained as in kernel where it's
168
+ desirable to use the less CPU load. Otherwise the default level is 3.
169
+
163
170
As with the kernel, :command: `mkfs.btrfs ` won't write compressed extents when
164
171
they would be larger than the uncompressed versions, and will set file attribute
165
172
*NOCOMPRESS * if its beginning is found to be incompressible.
@@ -173,7 +180,7 @@ OPTIONS
173
180
directory. The option *--rootdir * must also be specified, and *subdir * must be an
174
181
existing subdirectory within it. This option can be specified multiple times.
175
182
176
- *type * is an optional additional modifier. Valid choices are:
183
+ The *type * is an optional additional modifier. Valid choices are:
177
184
178
185
* *default *: create as default subvolume
179
186
* *ro *: create as read-only subvolume
@@ -183,24 +190,26 @@ OPTIONS
183
190
Only one of *default * and *default-ro * may be specified.
184
191
185
192
If you wish to create a subvolume with a name containing a colon and you don't
186
- want this to be parsed as containing a modifier, you can prefix the path with `./ `:
193
+ want this to be parsed as containing a modifier, you can prefix the path with :file: `./ `:
187
194
188
195
.. code-block :: bash
189
196
190
197
$ mkfs.btrfs --rootdir dir --subvol ./ro:subdir /dev/loop0
191
198
192
- If there are hard links inside *rootdir * and *subdir * will split the
193
- subvolumes, like the following case::
199
+ If there are hardlinks inside *rootdir * and *subdir * will split the
200
+ subvolumes, like the following case:
201
+
202
+ .. code-block :: none
194
203
195
204
rootdir/
196
205
|- hardlink1
197
206
|- hardlink2
198
207
|- subdir/ <- will be a subvolume
199
208
|- hardlink3
200
209
201
- In that case we cannot create `hardlink3 ` as hardlinks of
202
- `hardlink1 ` and `hardlink2 ` because hardlink3 will be inside a new
203
- subvolume.
210
+ In that case we cannot create :file: `hardlink3 ` as hardlinks of
211
+ :file: `hardlink1 ` and :file: `hardlink2 ` because :file: ` hardlink3 ` will
212
+ be inside a new subvolume.
204
213
205
214
--shrink
206
215
Shrink the filesystem to its minimal size, only works with *--rootdir * option.
0 commit comments