bug#24167: Way to tell parted to resize partition to max size?

Tom Roche <[email protected]>
Newsgroups gmane.comp.gnu.parted.bugs
Message-ID <[email protected]>
[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 <[email protected]>

[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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.