Bug 119971 - btrfs filesystem resize doesn't accept size subtraction values
Summary: btrfs filesystem resize doesn't accept size subtraction values
Status: RESOLVED CODE_FIX
Alias: None
Product: File System
Classification: Unclassified
Component: btrfs (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: David Sterba
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-10 13:39 UTC by Karl Richter
Modified: 2016-06-16 11:51 UTC (History)
1 user (show)

See Also:
Kernel Version: 4.5.5
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Karl Richter 2016-06-10 13:39:31 UTC
The example from the manpage (copied in order to avoid character confusion) fails due to

    $ sudo btrfs filesystem resize -1G /
    btrfs filesystem resize: invalid option -- '1'
    usage: btrfs filesystem resize [devid:][+/-]<newsize>[kKmMgGtTpPeE]|[devid:]max <path>

        Resize a filesystem

        If 'max' is passed, the filesystem will occupy all available space
        on the device 'devid'.
        [kK] means KiB, which denotes 1KiB = 1024B, 1MiB = 1024KiB, etc.

Specifying `max` works as expected. Do you have test cases for those crucial filesystem manipulation commands?

experienced with v4.5.3 on Ubuntu 16.04
Comment 1 Karl Richter 2016-06-16 08:37:29 UTC
still an issue with v4.6
Comment 2 David Sterba 2016-06-16 09:58:20 UTC
A workaround:

sudo btrfs filesystem resize -- -1G /
Comment 3 David Sterba 2016-06-16 11:51:20 UTC
Properly fixed in git and will be released in 4.6.1.

Note You need to log in before you can comment on or make changes to this bug.