bug#79171: -s is ignored when using resizepart for shrinking a partition
Casey Fitzpatrick <[email protected]> Mon, 4 Aug 2025 18:53:13 -0400
| Newsgroups | gmane.comp.gnu.parted.bugs |
|---|---|
| Message-ID | <CAEp-SHXKPPg2uC5yODcpb3=RU_bQ1FNG6VrkOpcOxMpQvrOZXQ@mail.gmail.com> |
--00000000000093c834063b91f948 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks! I missed that somehow searching around. I'm glad there is a workaround at least. On Mon, Aug 4, 2025, 5:57=E2=80=AFPM Brian C. Lane <[email protected]> wrote: > 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 promptin= g > > 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 wa= nt > > 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 > > --00000000000093c834063b91f948 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"auto">Thanks! I missed that somehow searching around. I'm g= lad there is a workaround at least.</div><br><div class=3D"gmail_quote"><di= v dir=3D"ltr" class=3D"gmail_attr">On Mon, Aug 4, 2025, 5:57=E2=80=AFPM Bri= an C. Lane <<a href=3D"mailto:[email protected]" target=3D"_blank" rel=3D"n= oreferrer">[email protected]</a>> wrote:<br></div><blockquote class=3D"gmai= l_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left= :1ex">On Mon, Aug 04, 2025 at 04:19:02PM -0400, Casey Fitzpatrick wrote:<br= > > When using resizepart with "-s" a warning prompt is still pr= inted when<br> > shrinking a partition. Then the command fails without actually prompti= ng<br> > for Yes/No.<br> > <br> > Seen using parted version 3.6:<br> > ```<br> > $ sudo parted -s /dev/loop0 unit B resizepart 1 420478975<br> > Warning: Shrinking a partition can cause data loss, are you sure you w= ant<br> > to continue?<br> > $ echo $?<br> > 1<br> > ```<br> <br> parted defaults to not doing things that could lose data, so shrinking<br> is only supported in interactive mode. This comes up from time to time.<br> eg.<br> <br> <a href=3D"https://lists.gnu.org/archive/html/bug-parted/2024-06/msg00000.h= tml" rel=3D"noreferrer noreferrer noreferrer" target=3D"_blank">https://lis= ts.gnu.org/archive/html/bug-parted/2024-06/msg00000.html</a><br> <br> Brian<br> <br> -- <br> Brian C. Lane (PST8PDT) - <a href=3D"http://weldr.io" rel=3D"noreferrer nor= eferrer noreferrer" target=3D"_blank">weldr.io</a> - lorax - parted - pykic= kstart<br> <br> </blockquote></div> --00000000000093c834063b91f948--