Skip to content

Commit 4837b98

Browse files
committed
btrfs-progs: document --offline resize feature
Add documentation for the new --offline feature in btrfs-filesystem.rst. Changed the warning to reflect that it is now possible to resize a btrfs image, but you need to specify the --offline flag. Highlighted that --offline flag only supports increasing the size of single device filesystems. Signed-off-by: Leo Martins <[email protected]>
1 parent 805cd1f commit 4837b98

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Documentation/btrfs-filesystem.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,7 @@ resize [options] [<devid>:][+/-]<size>[kKmMgGtTpPeE]|[<devid>:]max <path>
241241
can be resized by specifying a *devid*.
242242

243243
.. warning::
244-
If *path* is a file containing a BTRFS image then resize does not work
245-
as expected and does not resize the image. This would resize the underlying
246-
filesystem instead.
244+
To resize a file containing a BTRFS image, please use the --offline flag.
247245

248246
The *devid* can be found in the output of :command:`btrfs filesystem show` and
249247
defaults to 1 if not specified.
@@ -290,6 +288,14 @@ resize [options] [<devid>:][+/-]<size>[kKmMgGtTpPeE]|[<devid>:]max <path>
290288

291289
--enqueue
292290
wait if there's another exclusive operation running, otherwise continue
291+
--offline
292+
resize an unmounted (offline) filesystem. The offline resize
293+
functionality currently supports **only increasing** the size of
294+
**single-device** filesystems. Shrinking and multi-device filesystems
295+
are **not supported** with this option. For filesystems stored in regular
296+
files, the file will be truncated to the new size as part of the resize operation.
297+
This flag is **not compatible** with --enqueue since offline resizing
298+
is synchronous.
293299

294300
show [options] [<path>|<uuid>|<device>|<label>]
295301
Show the btrfs filesystem with some additional info about devices and space

0 commit comments

Comments
 (0)