GNU logs - #25006, boring messages


Message sent to bug-parted@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#25006: Non-interactively extending a GPT disklabel to cover all disk
Resent-From: Yann Dirson <yann.dirson@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-parted@HIDDEN
Resent-Date: Wed, 23 Nov 2016 16:31:01 +0000
Resent-Message-ID: <handler.25006.B.147991864025439 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 25006
X-GNU-PR-Package: parted
X-GNU-PR-Keywords: 
To: 25006 <at> debbugs.gnu.org
Cc: tech <tech@HIDDEN>
X-Debbugs-Original-To: bug-parted@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.147991864025439
          (code B ref -1); Wed, 23 Nov 2016 16:31:01 +0000
Received: (at submit) by debbugs.gnu.org; 23 Nov 2016 16:30:40 +0000
Received: from localhost ([127.0.0.1]:39468 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c9aRT-0006cE-KJ
	for submit <at> debbugs.gnu.org; Wed, 23 Nov 2016 11:30:39 -0500
Received: from eggs.gnu.org ([208.118.235.92]:54438)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <yann.dirson@HIDDEN>) id 1c9YoJ-00042G-C9
 for submit <at> debbugs.gnu.org; Wed, 23 Nov 2016 09:46:08 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <yann.dirson@HIDDEN>) id 1c9YoD-0002Am-8M
 for submit <at> debbugs.gnu.org; Wed, 23 Nov 2016 09:46:02 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,HTML_MESSAGE,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:58369)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <yann.dirson@HIDDEN>)
 id 1c9YoD-0002AX-40
 for submit <at> debbugs.gnu.org; Wed, 23 Nov 2016 09:46:01 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:45393)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <yann.dirson@HIDDEN>) id 1c9YoB-00013P-T8
 for bug-parted@HIDDEN; Wed, 23 Nov 2016 09:46:00 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <yann.dirson@HIDDEN>) id 1c9YoA-00027n-S3
 for bug-parted@HIDDEN; Wed, 23 Nov 2016 09:45:59 -0500
Received: from mail-io0-x231.google.com ([2607:f8b0:4001:c06::231]:36522)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <yann.dirson@HIDDEN>)
 id 1c9YoA-00026V-Lz
 for bug-parted@HIDDEN; Wed, 23 Nov 2016 09:45:58 -0500
Received: by mail-io0-x231.google.com with SMTP id x94so27254123ioi.3
 for <bug-parted@HIDDEN>; Wed, 23 Nov 2016 06:45:58 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=blade-group-com.20150623.gappssmtp.com; s=20150623;
 h=mime-version:from:date:message-id:subject:to:cc;
 bh=9kvcd935UtC3SeE2teNPs1jvBZ0CvPbv8kgWIkjchKk=;
 b=BHP2wII40xVjKzP4uJGJyc8PXIQX3+HWd/yucalrJ9spmUuRHE6SjK2lbiLmz/Ncyx
 uM+RDNVfSjyrjZBqXIFtH7pq/jsDxuhSuXHQyAaYWekjwa4sZ9N5mXICP+9gmb9C2n83
 8sy/wV2tD9S+4fSHD4dRBefEvvVZqE81K8195Qq7NYc05homne9RBDSJvNiVHAwMeVci
 63LknuKRJ7v2Hf07kQ981tQuxLq4CklOhYrTEbYlwym87tDU3oP+cR6A84fl69VbyOyD
 7kODxqiikFw4tYylKU9/5ukbmjAUn2LY6uFrXmMzDE4XzD1sfik4HdQN9lmxv4PipT/R
 8vGg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc;
 bh=9kvcd935UtC3SeE2teNPs1jvBZ0CvPbv8kgWIkjchKk=;
 b=liw4r6jGR6CngbugdcvuqHwJyM1/X0II8plMqFrVh10DpKknK/U2A1hJq1yuhcG2PB
 0ilmTGRAwen5UNajmq+w7STXZ5myVsy1mZpXlrLQ3pYtWc8FEjDKFKWt2BDVHM3USGBi
 tD+Fc8Ut1l6mx2oUVTu8tqc+i38qsx1xQCHjbV9/gGlVJ24Abzc2t+foYlGPmykMp8DT
 dKeCdJz0iO6TGX+eptZqVOLKxAxxIBwjvMUZMxSgmHhZuG8MdAWNlGbAu9YxJW5QTvof
 +Ql62ISJxCPjfK6SsYrgb7KGvt+/xDfWuECfrtovKY7EAQ20ZxIyTX3KbkCbkX0jH3mU
 LIWw==
X-Gm-Message-State: AKaTC015xquS+mPqBUphqE1Bndbn3fHO4ujQWGT0DzTUfN9t3bDneiIjvpUFG/9lSsoPUpvsammO5IfiWm8VucBP
X-Received: by 10.107.1.138 with SMTP id 132mr3485835iob.72.1479912357420;
 Wed, 23 Nov 2016 06:45:57 -0800 (PST)
MIME-Version: 1.0
Received: by 10.79.96.68 with HTTP; Wed, 23 Nov 2016 06:45:57 -0800 (PST)
From: Yann Dirson <yann.dirson@HIDDEN>
Date: Wed, 23 Nov 2016 15:45:57 +0100
Message-ID: <CA+4=imZXR=rYjeUrYmbe+BNqmFjRLa+m9UZEMhYVGVGOHtQQNQ@HIDDEN>
Content-Type: multipart/alternative; boundary=001a113965ae5d101e0541f8f2b5
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Mailman-Approved-At: Wed, 23 Nov 2016 11:30:39 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

--001a113965ae5d101e0541f8f2b5
Content-Type: text/plain; charset=UTF-8

If we build a GPT image for flashing on arbitrary disks, chances are there
is space left after
that second partition-table, placed at end of image.

When launching parted interactively, we get asked "Not all of the space
available to ... appears to be used" and asked "Fix/Ignore?".

The code does not look like the job done on "fix" is available from any
other mean, whether lib or parted command. And the exception system does
not look like it will work with no tty attached, so
just using "echo fix | parted /dev/whatever print" will just not workaround
this.

Did I miss something ?

What would be the preferred approach ?  What about adding a flag to
auto-fix this ?

Best regards,
-- 
Yann Dirson <yann@HIDDEN>
Blade -- 90 avenue des Ternes, 75017 Paris

--001a113965ae5d101e0541f8f2b5
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div><div><div><div>If we build a GPT image for flash=
ing on arbitrary disks, chances are there is space left after<br></div>that=
 second partition-table, placed at end of image.<br><br></div>When launchin=
g parted interactively, we get asked &quot;Not all of the space available t=
o ... appears to be used&quot; and asked &quot;Fix/Ignore?&quot;.<br><br></=
div>The code does not look like the job done on &quot;fix&quot; is availabl=
e from any other mean, whether lib or parted command. And the exception sys=
tem does not look like it will work with no tty attached, so<br></div>just =
using &quot;echo fix | parted /dev/whatever print&quot; will just not worka=
round this.<br><br></div>Did I miss something ?<br clear=3D"all"><div><div>=
<div><div><div><div><div><div><br></div><div>What would be the preferred ap=
proach ?=C2=A0 What about adding a flag to auto-fix this ?<br><br></div><di=
v>Best regards,<br></div><div>-- <br><div class=3D"gmail_signature" data-sm=
artmail=3D"gmail_signature">Yann Dirson &lt;<a href=3D"mailto:yann@blade-gr=
oup.com" target=3D"_blank">yann@HIDDEN</a>&gt;<br>Blade -- 90 aven=
ue des Ternes, 75017 Paris<br></div>
</div><br></div></div></div></div></div></div></div></div>

--001a113965ae5d101e0541f8f2b5--




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Yann Dirson <yann.dirson@HIDDEN>
Subject: bug#25006: Acknowledgement (Non-interactively extending a GPT
 disklabel to cover all disk)
Message-ID: <handler.25006.B.147991864025439.ack <at> debbugs.gnu.org>
References: <CA+4=imZXR=rYjeUrYmbe+BNqmFjRLa+m9UZEMhYVGVGOHtQQNQ@HIDDEN>
X-Gnu-PR-Message: ack 25006
X-Gnu-PR-Package: parted
Reply-To: 25006 <at> debbugs.gnu.org
Date: Wed, 23 Nov 2016 16:31:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-parted@HIDDEN

If you wish to submit further information on this problem, please
send it to 25006 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
25006: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D25006
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-parted@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#25006: Non-interactively extending a GPT disklabel to cover all disk
Resent-From: Yann Dirson <yann.dirson@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-parted@HIDDEN
Resent-Date: Thu, 01 Dec 2016 10:09:02 +0000
Resent-Message-ID: <handler.25006.B25006.148058690421207 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 25006
X-GNU-PR-Package: parted
X-GNU-PR-Keywords: 
To: 25006 <at> debbugs.gnu.org
Cc: tech <tech@HIDDEN>
Received: via spool by 25006-submit <at> debbugs.gnu.org id=B25006.148058690421207
          (code B ref 25006); Thu, 01 Dec 2016 10:09:02 +0000
Received: (at 25006) by debbugs.gnu.org; 1 Dec 2016 10:08:24 +0000
Received: from localhost ([127.0.0.1]:48090 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cCOHv-0005Vz-O9
	for submit <at> debbugs.gnu.org; Thu, 01 Dec 2016 05:08:24 -0500
Received: from mail-io0-f174.google.com ([209.85.223.174]:34214)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <yann.dirson@HIDDEN>) id 1cCOHt-0005Vm-Kf
 for 25006 <at> debbugs.gnu.org; Thu, 01 Dec 2016 05:08:22 -0500
Received: by mail-io0-f174.google.com with SMTP id c21so380687503ioj.1
 for <25006 <at> debbugs.gnu.org>; Thu, 01 Dec 2016 02:08:21 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=blade-group-com.20150623.gappssmtp.com; s=20150623;
 h=mime-version:in-reply-to:references:from:date:message-id:subject:to
 :cc; bh=+t8i5Mw10OeCUIhcJBnIubtMiLWCDV124dU1Bn87MsQ=;
 b=MBPk4ysZlryFRvH1Aes53qpfuKMBN9130fCftEu97BP8WV3L4ESIfrcD0VnO1D1Zd4
 jzRu7SZlImmz3/SxQ193kojtVKEI5upwBkNgfk4uqtto9bOjFGrbMh80wNIJVEZeNsbZ
 L8Z8YE+plNRaiwf+op04Kgm8yW7PgmGO0ZsZ4DMLwBAMRxDE+cmJU8NtmkREnlyjQUh6
 oSlKNuJtJfN6RsXPFEthkC1wghO5bdRHr7J3/giIkOXvL/FEDrrtyQZMQP5zBforK6ic
 r87o2zNYsnmfmBzvCeOJ8Yi0H7IdaEtlTBjzqO8JrGDBCz7PdwJarHz51n18y1JWfWsC
 HeoQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:in-reply-to:references:from:date
 :message-id:subject:to:cc;
 bh=+t8i5Mw10OeCUIhcJBnIubtMiLWCDV124dU1Bn87MsQ=;
 b=HUKK5dyyZUM3VmFWANkpC5+3CVflIKVkS3lfsdDjZ8Mv733s6706o51epyxhPADucr
 EcMUNtAJI8IleW6A+D9dH9bEmtte2Eql5jUXwTrcuDGyosMHPlLYVKkouT3uU+V//Agb
 gGvs/KO/+ZeOtlP9Xq42+WPx+P5v07lLBsTkeeQOYvyhUzStTlEd6Q4QSAAMubSJFU3f
 v56sG7dq8w4b9GiI3c8X04vROTGz0i4UEMpMuCux0b6P3RVdtUYJS9gmj1GFAgvVnwk+
 WM3k5vbLaVj8G9UyhuF4RvpDFyiDgnJ/8S3hU0CFewB88wNZwnE80CR9y9AlqsiQxLxT
 DRLQ==
X-Gm-Message-State: AKaTC02cCJs+3Ky2TMDyz8RYT1EmoMLiOaXlrThYFMvLCcdjBzz3Tvd21+UE8NuDjinctUSsLUxvzE0zH7aBzBmw
X-Received: by 10.36.213.3 with SMTP id a3mr32355212itg.36.1480586892266; Thu,
 01 Dec 2016 02:08:12 -0800 (PST)
MIME-Version: 1.0
Received: by 10.79.209.139 with HTTP; Thu, 1 Dec 2016 02:08:11 -0800 (PST)
In-Reply-To: <CA+4=imZXR=rYjeUrYmbe+BNqmFjRLa+m9UZEMhYVGVGOHtQQNQ@HIDDEN>
References: <CA+4=imZXR=rYjeUrYmbe+BNqmFjRLa+m9UZEMhYVGVGOHtQQNQ@HIDDEN>
From: Yann Dirson <yann.dirson@HIDDEN>
Date: Thu, 1 Dec 2016 11:08:11 +0100
Message-ID: <CA+4=imZVc6s9Kmf5yyoM40vpNn8V3ixiPDsKTbCNt0+wpRdFzw@HIDDEN>
Content-Type: multipart/alternative; boundary=94eb2c05f6bcc5e4e7054295ff67
X-Spam-Score: -0.2 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.2 (/)

--94eb2c05f6bcc5e4e7054295ff67
Content-Type: text/plain; charset=UTF-8

In fact, this issue and the "command parameters ignored when parted sees
need to fix GPT" I also reported work together in a surprising way:
<http://lists.gnu.org/archive/html/bug-parted/2016-11/msg00003.html>
If the GPT needs to be extended, then the following command will just fix
it, as arguments on the commandline appear to be emulating user input in
some way :

parted /dev/whatever print fix

However, somewhat expectedly, issuing this command when there is nothing to
fix will result in an error message with full usage text etc.

Side note: testing a grep pattern to just run the fix command when needed,
I noticed that surprisingly, the output, which is on a single line, gets
split to fit in 80 colums when fed into a pipe. Not sure it is really
useful, but confusing for sure...

Thus ending with this hack to get the GPT back on its feet:

if parted $DISK print 2>&1 | grep -q 'Not all of the space available .*
appears to be used'; then
    parted $DISK print fix
fi

Hope it will help someone out there :)
<http://lists.gnu.org/archive/html/bug-parted/2016-11/msg00003.html>

2016-11-23 15:45 GMT+01:00 Yann Dirson <yann.dirson@HIDDEN>:

> If we build a GPT image for flashing on arbitrary disks, chances are there
> is space left after
> that second partition-table, placed at end of image.
>
> When launching parted interactively, we get asked "Not all of the space
> available to ... appears to be used" and asked "Fix/Ignore?".
>
> The code does not look like the job done on "fix" is available from any
> other mean, whether lib or parted command. And the exception system does
> not look like it will work with no tty attached, so
> just using "echo fix | parted /dev/whatever print" will just not
> workaround this.
>
> Did I miss something ?
>
> What would be the preferred approach ?  What about adding a flag to
> auto-fix this ?
>
> Best regards,
> --
> Yann Dirson <yann@HIDDEN>
> Blade -- 90 avenue des Ternes, 75017 Paris
>
>


-- 
Yann Dirson <yann@HIDDEN>
Blade -- 90 avenue des Ternes, 75017 Paris

--94eb2c05f6bcc5e4e7054295ff67
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div><div>In fact, this issue and the &quot;<a name=
=3D"00003" href=3D"http://lists.gnu.org/archive/html/bug-parted/2016-11/msg=
00003.html">command parameters ignored when parted sees need to	fix GPT&quo=
t; I also reported work together in a surprising way:</a><br></div><div>If =
the GPT needs to be extended, then the following command will just fix it, =
as arguments on the commandline appear to be emulating user input in some w=
ay :<br></div><br>parted /dev/whatever print fix<br><br></div>However, some=
what expectedly, issuing this command when there is nothing to fix will res=
ult in an error message with full usage text etc.<br><br>Side note: testing=
 a grep pattern to just run the fix command when needed, I noticed that sur=
prisingly, the output, which is on a single line, gets split to fit in 80 c=
olums when fed into a pipe. Not sure it is really useful, but confusing for=
 sure...<br><br>Thus ending with this hack to get the GPT back on its feet:=
<br><br>if parted $DISK print 2&gt;&amp;1 | grep -q &#39;Not all of the spa=
ce available .* appears to be used&#39;; then<br>=C2=A0=C2=A0=C2=A0 parted =
$DISK print fix<br>fi<br><br></div>Hope it will help someone out there :)<b=
r><div><div><div><a name=3D"00003" href=3D"http://lists.gnu.org/archive/htm=
l/bug-parted/2016-11/msg00003.html"></a></div><div class=3D"gmail_extra"><b=
r><div class=3D"gmail_quote">2016-11-23 15:45 GMT+01:00 Yann Dirson <span d=
ir=3D"ltr">&lt;<a href=3D"mailto:yann.dirson@HIDDEN" target=3D"_bl=
ank">yann.dirson@HIDDEN</a>&gt;</span>:<br><blockquote class=3D"gm=
ail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-le=
ft:1ex"><div dir=3D"ltr"><div><div><div><div><div>If we build a GPT image f=
or flashing on arbitrary disks, chances are there is space left after<br></=
div>that second partition-table, placed at end of image.<br><br></div>When =
launching parted interactively, we get asked &quot;Not all of the space ava=
ilable to ... appears to be used&quot; and asked &quot;Fix/Ignore?&quot;.<b=
r><br></div>The code does not look like the job done on &quot;fix&quot; is =
available from any other mean, whether lib or parted command. And the excep=
tion system does not look like it will work with no tty attached, so<br></d=
iv>just using &quot;echo fix | parted /dev/whatever print&quot; will just n=
ot workaround this.<br><br></div>Did I miss something ?<br clear=3D"all"><d=
iv><div><div><div><div><div><div><div><br></div><div>What would be the pref=
erred approach ?=C2=A0 What about adding a flag to auto-fix this ?<br><br><=
/div><div>Best regards,<span class=3D"HOEnZb"><font color=3D"#888888"><br><=
/font></span></div><span class=3D"HOEnZb"><font color=3D"#888888"><div>-- <=
br><div class=3D"m_-7231031049994904839gmail_signature" data-smartmail=3D"g=
mail_signature">Yann Dirson &lt;<a href=3D"mailto:yann@HIDDEN" tar=
get=3D"_blank">yann@HIDDEN</a>&gt;<br>Blade -- 90 avenue des Terne=
s, 75017 Paris<br></div>
</div><br></font></span></div></div></div></div></div></div></div></div>
</blockquote></div><br><br clear=3D"all"><br>-- <br><div class=3D"gmail_sig=
nature" data-smartmail=3D"gmail_signature">Yann Dirson &lt;<a href=3D"mailt=
o:yann@HIDDEN" target=3D"_blank">yann@HIDDEN</a>&gt;<br>B=
lade -- 90 avenue des Ternes, 75017 Paris<br></div>
</div></div></div></div>

--94eb2c05f6bcc5e4e7054295ff67--




Message sent to bug-parted@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#25006: Non-interactively extending a GPT disklabel to cover all disk
Resent-From: Phil Susi <psusi@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-parted@HIDDEN
Resent-Date: Wed, 19 Apr 2017 13:43:01 +0000
Resent-Message-ID: <handler.25006.B25006.1492609363313 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 25006
X-GNU-PR-Package: parted
X-GNU-PR-Keywords: 
To: Yann Dirson <yann.dirson@HIDDEN>, 25006 <at> debbugs.gnu.org
Cc: tech <tech@HIDDEN>
Received: via spool by 25006-submit <at> debbugs.gnu.org id=B25006.1492609363313
          (code B ref 25006); Wed, 19 Apr 2017 13:43:01 +0000
Received: (at 25006) by debbugs.gnu.org; 19 Apr 2017 13:42:43 +0000
Received: from localhost ([127.0.0.1]:55723 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1d0psZ-00004y-5V
	for submit <at> debbugs.gnu.org; Wed, 19 Apr 2017 09:42:43 -0400
Received: from mail-ua0-f196.google.com ([209.85.217.196]:35681)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <phillsusi@HIDDEN>) id 1d0psX-0008WR-Pw
 for 25006 <at> debbugs.gnu.org; Wed, 19 Apr 2017 09:42:42 -0400
Received: by mail-ua0-f196.google.com with SMTP id j59so2275561uad.2
 for <25006 <at> debbugs.gnu.org>; Wed, 19 Apr 2017 06:42:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:references:cc:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-transfer-encoding;
 bh=E3iHwBmczJRC0VcDqXLMTl5Bip3N6FJo6+pd6xQipyY=;
 b=sbvr2RBYuDRo4JLU/ydNsdYFW/xivyVbZ3DZkpskOr8Grw0Cd/xDDFWCCsoElh3Xqr
 GOXyQVh4U0Ld5JiWFJZ/eYyPxa0Ai3n0iwEDnr62B5hn2JpgM1whGI6tNFzhpuIoDXjO
 3dVdf3IjR7N2GA2C5JEFBr0TwuoaAd6/Un9zookJUOF1dIClnJmF6k6SLCclAZhAxxXw
 48qdCoJJn5phdCCaQWqEGCZCZMM2N2Fym8NcENfiImF1qEyQZCh4ZHzTINwEgLQhr6rC
 zx2l2OINLgeZcR/N2D66FATXR1D4TJdNjgKmqzTIQyWlLvQFBTi2w2X77rR/Bgd7bnBG
 ChbQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:references:cc:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-transfer-encoding;
 bh=E3iHwBmczJRC0VcDqXLMTl5Bip3N6FJo6+pd6xQipyY=;
 b=Ur8gj1kEOuoKQXjvZD7Ja10Jq2xztspEsabXX9uZLx1SGYPJf7oj9DBGmtiS2YcCID
 60bEwFqQzTVk3HhTnobOq6nmwfVw5POqkiQInWftXCrRt/JeuQj9juOpo2IAchM0nqZj
 e8DnTcKA1W/DXBNSCzeAwC6BLOl0pxyBiQw7j4uLoEdSngIsmuNT5bbjDB2rRjvit7bm
 0acOXDi9XVPrG8/nv3od+Y/aJfKF8pjQ27rY4/IHAH1W2YZOia+zJtneeR6VBWhfDxoT
 5oizCJbb7dAuNdtXakh3Eyb0cKWLcCcU+EXBtEWBeyntpiaQWR07pHmAu+XU2ZAy3DSH
 vNmg==
X-Gm-Message-State: AN3rC/4j9iiPslshiPQjlHpTSz6LjuVg4iBE0nPREDHCYjS9O69l82Fk
 LPQk/tVpruTTGQ==
X-Received: by 10.31.220.199 with SMTP id t190mr1003214vkg.3.1492609356256;
 Wed, 19 Apr 2017 06:42:36 -0700 (PDT)
Received: from [10.1.1.184] (fl-67-77-88-12.sta.embarqhsd.net. [67.77.88.12])
 by smtp.googlemail.com with ESMTPSA id
 u136sm105730vkb.21.2017.04.19.06.42.35
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 19 Apr 2017 06:42:35 -0700 (PDT)
References: <CA+4=imZXR=rYjeUrYmbe+BNqmFjRLa+m9UZEMhYVGVGOHtQQNQ@HIDDEN>
 <CA+4=imZVc6s9Kmf5yyoM40vpNn8V3ixiPDsKTbCNt0+wpRdFzw@HIDDEN>
From: Phil Susi <psusi@HIDDEN>
Message-ID: <6bac3121-31e8-7a7b-b74d-8a65123be53d@HIDDEN>
Date: Wed, 19 Apr 2017 09:44:18 -0400
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101
 Thunderbird/45.8.0
MIME-Version: 1.0
In-Reply-To: <CA+4=imZVc6s9Kmf5yyoM40vpNn8V3ixiPDsKTbCNt0+wpRdFzw@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.7 (/)

On 12/1/2016 5:08 AM, Yann Dirson wrote:
> In fact, this issue and the "command parameters ignored when parted sees
> need to fix GPT" I also reported work together in a surprising way:
> <http://lists.gnu.org/archive/html/bug-parted/2016-11/msg00003.html>
> If the GPT needs to be extended, then the following command will just fix
> it, as arguments on the commandline appear to be emulating user input in
> some way :
> 
> parted /dev/whatever print fix
> 
> However, somewhat expectedly, issuing this command when there is nothing to
> fix will result in an error message with full usage text etc.

Indeed, and I have been struggling with what to do about this for a long
time now.  As you noted in your other bug report, it can be problematic
if you get an exception and it looks at the command line arguments for
an answer.  I think the fix for that is that the exception handler
should never take input from the command line buffer, but then you would
not be able to use this trick to fix the table.

There is an undocumented parted switch used for internal testing... iirc
it was ---pretend-input-tty.  Using that will let you pipe the exception
handler responses in.  You can also use expect to script responses.

That said, it would be nice to be able to specify some sort of
--auto-fix-foo switch, but the switches are processed by parted, and the
exceptions are thrown by libparted.  Parted is given a localized text
description of the error, so it is difficult to recognize the exception
as the specific one it has been asked to auto fix.  Because the strings
often have substituted strings, we can't just strcmp().  Now that I
think about it again though, I may be able to pull it off using
sscanf().  This might work for parted though, where we can make sure to
keep parted and libparted in sync with respect to the exact exception
strings, but other tools that rely on libparted would get out of sync
and this string comparison would break.

> Side note: testing a grep pattern to just run the fix command when needed,
> I noticed that surprisingly, the output, which is on a single line, gets
> split to fit in 80 colums when fed into a pipe. Not sure it is really
> useful, but confusing for sure...
> 
> Thus ending with this hack to get the GPT back on its feet:
> 
> if parted $DISK print 2>&1 | grep -q 'Not all of the space available .*
> appears to be used'; then
>     parted $DISK print fix
> fi
> 
> Hope it will help someone out there :)
> <http://lists.gnu.org/archive/html/bug-parted/2016-11/msg00003.html>

Nice.






Last modified: Mon, 25 Nov 2019 12:00:02 UTC

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