[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24167: Way to tell parted to resize partition to max size?
From: |
Tom Roche |
Subject: |
bug#24167: Way to tell parted to resize partition to max size? |
Date: |
Fri, 12 Aug 2016 16:36:21 -0700 |
User-agent: |
GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.14.5) |
[footnotes after .sig]
Petter Reinholdtsen[1]
> With btrfs I can do like this to extend to the end of the partition:
> btrfs filesystem resize max /
> Could parted be changed to allow something similar? Perhaps
> resizepart 1 max
WARNING: I have not tried this! but I believe you want `-1`, e.g.
resizepart 1 -1
I am basing this on the knowledge that
sudo parted ${DRIVE_DEV} --script -- mkpart primary 0 -1
I concur (presuming it works :-) that note of the semantics of `-1` should be
added to the manual, e.g. here[2] and here[3]. Note the manual[2] does state
clearly
>> When growing a partition you will want to grow the filesystem afterwards, but
>> when shrinking, you need to shrink the filesystem before the partition.
HTH, Tom Roche <address@hidden>
[1]: http://lists.gnu.org/archive/html/bug-parted/2016-08/msg00001.html
[2]: https://www.gnu.org/software/parted/manual/parted.html#resizepart
[3]: https://www.gnu.org/software/parted/manual/parted.html#mkpart