GNU bug report logs - #79171
-s is ignored when using resizepart for shrinking a partition

Previous Next

Package: parted;

Reported by: Casey Fitzpatrick <kcghost <at> gmail.com>

Date: Mon, 4 Aug 2025 20:53:03 UTC

Severity: normal

Full log


Message #8 received at 79171 <at> debbugs.gnu.org (full text, mbox):

From: "Brian C. Lane" <bcl <at> redhat.com>
To: Casey Fitzpatrick <kcghost <at> gmail.com>
Cc: 79171 <at> debbugs.gnu.org
Subject: Re: bug#79171: -s is ignored when using resizepart for shrinking a
 partition
Date: Mon, 4 Aug 2025 14:57:49 -0700
On Mon, Aug 04, 2025 at 04:19:02PM -0400, Casey Fitzpatrick wrote:
> When using resizepart with "-s" a warning prompt is still printed when
> shrinking a partition. Then the command fails without actually prompting
> for Yes/No.
> 
> Seen using parted version 3.6:
> ```
> $ sudo parted -s /dev/loop0 unit B resizepart 1 420478975
> Warning: Shrinking a partition can cause data loss, are you sure you want
> to continue?
> $ echo $?
> 1
> ```

parted defaults to not doing things that could lose data, so shrinking
is only supported in interactive mode. This comes up from time to time.
eg.

https://lists.gnu.org/archive/html/bug-parted/2024-06/msg00000.html

Brian

-- 
Brian C. Lane (PST8PDT) - weldr.io - lorax - parted - pykickstart





This bug report was last modified 11 days ago.

Previous Next


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