GNU bug report logs - #24167
Way to tell parted to resize partition to max size?

Previous Next

Package: parted;

Reported by: Petter Reinholdtsen <pere <at> hungry.com>

Date: Sat, 6 Aug 2016 07:00:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Tom Roche <Tom_Roche <at> pobox.com>
To: 24167 <at> debbugs.gnu.org
Subject: bug#24167: Way to tell parted to resize partition to max size?
Date: Fri, 12 Aug 2016 16:36:21 -0700
[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 <Tom_Roche <at> pobox.com>

[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




This bug report was last modified 8 years and 313 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.