diff options
author | Filipe Manana <fdmanana@suse.com> | 2015-07-16 16:47:13 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2015-08-31 19:25:03 +0200 |
commit | a57606e815f3e1c4fe66c61ce3c6e3621ea522e9 (patch) | |
tree | c080653dec7deef76a04045c57ee170a8b091aae /Documentation/btrfs-filesystem.asciidoc | |
parent | 9dbee1a6802896a6443896bfe407ab4062dff4f9 (diff) |
Btrfs-progs: add feature to get mininum size for resizing a fs/device
Currently there is not way for a user to know what is the minimum size a
device of a btrfs filesystem can be resized to. Sometimes the value of
total allocated space (sum of all allocated chunks/device extents), which
can be parsed from 'btrfs filesystem show' and 'btrfs filesystem usage',
works as the minimum size, but sometimes it does not, namely when device
extents have to relocated to holes (unallocated space) within the new
size of the device (the total allocated space sum).
This change adds the ability to reliably compute such minimum value and
extents 'btrfs filesystem resize' with the following syntax to get such
value:
btrfs filesystem resize [devid:]get_min_size
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'Documentation/btrfs-filesystem.asciidoc')
-rw-r--r-- | Documentation/btrfs-filesystem.asciidoc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Documentation/btrfs-filesystem.asciidoc b/Documentation/btrfs-filesystem.asciidoc index 31cd51be..2b34242d 100644 --- a/Documentation/btrfs-filesystem.asciidoc +++ b/Documentation/btrfs-filesystem.asciidoc @@ -93,7 +93,7 @@ If a newlabel optional argument is passed, the label is changed. NOTE: the maximum allowable length shall be less than 256 chars // Some wording are extracted by the resize2fs man page -*resize* [<devid>:][+/-]<size>[kKmMgGtTpPeE]|[<devid>:]max <path>:: +*resize* [<devid>:][+/-]<size>[kKmMgGtTpPeE]|[<devid>:]max|[<devid>:]get_min_size <path>:: Resize a mounted filesystem identified by directory <path>. A particular device can be resized by specifying a <devid>. + @@ -113,6 +113,8 @@ KiB, MiB, GiB, TiB, PiB, or EiB, respectively. Case does not matter. + If \'max' is passed, the filesystem will occupy all available space on the device devid. +If \'get_min_size' is passed, return the minimum size the device can be +shrunk to, without performing any resize operation. + The resize command does not manipulate the size of underlying partition. If you wish to enlarge/reduce a filesystem, you must make sure you |