From unknown Tue Sep 09 21:32:48 2025 X-Loop: help-debbugs@gnu.org Subject: bug#34430: GNU Parted 3.2 =?UTF-8?Q?=E2=80=93?= Disks' sizes calculation model may be incorrect Resent-From: Ricky Tigg Original-Sender: "Debbugs-submit" Resent-CC: bug-parted@gnu.org Resent-Date: Mon, 11 Feb 2019 10:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34430 X-GNU-PR-Package: parted X-GNU-PR-Keywords: To: 34430@debbugs.gnu.org X-Debbugs-Original-To: bug-parted@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.154988244816996 (code B ref -1); Mon, 11 Feb 2019 10:55:02 +0000 Received: (at submit) by debbugs.gnu.org; 11 Feb 2019 10:54:08 +0000 Received: from localhost ([127.0.0.1]:43185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gt9Dz-0004Q4-N9 for submit@debbugs.gnu.org; Mon, 11 Feb 2019 05:54:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33351) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gt9Dx-0004PV-HO for submit@debbugs.gnu.org; Mon, 11 Feb 2019 05:54:05 -0500 Received: from lists.gnu.org ([209.51.188.17]:39528) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gt9Dr-0003Lo-6w for submit@debbugs.gnu.org; Mon, 11 Feb 2019 05:54:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gt9Dq-0006Xu-9e for bug-parted@gnu.org; Mon, 11 Feb 2019 05:53:59 -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,FREEMAIL_FROM, HTML_MESSAGE autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gt9Do-0003KX-Ba for bug-parted@gnu.org; Mon, 11 Feb 2019 05:53:58 -0500 Received: from mail-ot1-x32f.google.com ([2607:f8b0:4864:20::32f]:37471) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gt9Do-0003J7-5L for bug-parted@gnu.org; Mon, 11 Feb 2019 05:53:56 -0500 Received: by mail-ot1-x32f.google.com with SMTP id b3so543866otp.4 for ; Mon, 11 Feb 2019 02:53:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=1nbVimbWY0nWxOyBHule5Z6/6FKgWEsza245iEsVjV4=; b=M+bD88KW9+O8iHDSwE+joMEhEncwt5a/Xx7/6cxq0RuWAcJlPprJkm2osupOUl0fU9 MUvnrdl7qJv+IQ5q5PTP9dxDTiORi3MEOm/QaOQN/M+qVmYbt0mcV1cmGlDpIAiNvgdW rvFZnU+fZK9E+oRyg7XOZBhIc1gmk9I1MH2V7oqDNLgjOpemMgcj+4e/yoVSoMJK08mF +SEV80Yxu1SsB+vKNJhIZlr2YocbZ59HjYcfvTb3sYn2EgrTpW97K/nDvChIONXKVlDu g/Us0Dux9PWI7kKK3vbwqx0gnrRveSYhgYmH5WHMscNsOb7yJAmk1yL7cuRa54BYqnzu 4euQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=1nbVimbWY0nWxOyBHule5Z6/6FKgWEsza245iEsVjV4=; b=rcZOumSs0/VffZm0Ed7ZKmqC0oIjlBPqOXVzqq8l/p4pXGSfDdhLjP4h6NOjkAwEUq WwHchBlLmKTTRFrFvDRoeUhKwfySdpQdQ3KDrk5HQ44AKLinHTrU/CyrSLJiI/H/EbZa RH2bapkLENL07ohHSzSej3bya1aUp3PKqZJ6hpPhvtHR6MkzoFETQeozAIA+BEVBMm6q LX5KHkYMxrGNgFk+iICS37QVna6yV9goY8tAISQzEIkUw+gR88+quAx5zFVsKL9SJUht 9TS66bmmX2UOetLbXsh8NY56aaQ+kIqUPiXBihXcixABBtmQgCuY/GOVbY99H+pJ8oN8 eSkQ== X-Gm-Message-State: AHQUAuab42xbY8wdPu/rWOEpb4lgv9BvAprMwY29n11n0jhM9RIJQM58 Dm4LL4zYD3gciKndLhZYG5HszSc7aDEvfuRpNrIAITUffKI= X-Google-Smtp-Source: AHgI3IZ1Kh5dYHOheCGAE+I75hLYVbu8VFwFPl6ZZJQU59AHNo7Ehrroo4UapZ9qRELqQgZ4IdllUAfWMkf4Re0bLLI= X-Received: by 2002:a9d:7841:: with SMTP id c1mr2255214otm.354.1549882431037; Mon, 11 Feb 2019 02:53:51 -0800 (PST) MIME-Version: 1.0 From: Ricky Tigg Date: Mon, 11 Feb 2019 11:53:36 +0100 Message-ID: Content-Type: multipart/alternative; boundary="000000000000bee43e05819c1f6d" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::32f X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --000000000000bee43e05819c1f6d Content-Type: text/plain; charset="UTF-8" Hi. Commands executed: # dd if=/dev/zero of=/dev/sdc # parted /dev/sdc (parted) unit s print free Error: /dev/sdc: unrecognised disk label Model: (...) (scsi) Disk /dev/sdc: 15638480s Sector size (logical/physical): 512B/512B Partition Table: unknown Disk Flags: (parted) mktable msdos (parted) unit s print free Disk /dev/sdc: 15638480s Partition Table: msdos Number Start End Size Type File system Flags 2s 15638479s 15638478s Free Space Disks' sizes calculation model, involved in the calculation of values related to disks, appears to be incorrect. Here an illustration from above output, assuming that disks start from sector 1; according to that assumption correct calculation model regarding disks' sizes is expected to be: Disk = *Size* + (Start - *1* = 15638478s + (2 -1)s = *15638479s*. However exhibited Disk /dev/sdc size is 15638480s. Regards R.T. --000000000000bee43e05819c1f6d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi. Commands executed:

# dd if=3D/dev/zero of=3D/dev/sdc

# par= ted /dev/sdc
(parted) unit s print free
Error: /dev/sdc: unrecognised= disk label
Model: (...) (scsi)=C2=A0=C2=A0
Disk /dev/sdc: 15638480s=
Sector size (logical/physical): 512B/512B
Partition Table: unknownDisk Flags:=C2=A0

(par= ted) mktable msdos=C2=A0
(parted) unit s print free=C2=A0

Disk /dev/sdc: 15638480s
P= artition Table: msdos

Number=C2=A0 Start=C2=A0 End=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 Size=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Type=C2=A0 File system=C2=A0 F= lags
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 2s=C2=A0=C2=A0=C2=A0=C2= =A0 15638479s=C2=A0 15638478s=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Fre= e Space

Disks' sizes= calculation model, involved in the calculation of values related to disks,= appears to be incorrect. Here an illustration from above output, assuming = that disks start from sector 1; according to that assumption correct calcul= ation model regarding disks' sizes is expected to be:

Disk <path>= ; =3D Size=C2=A0+ (Start - 1<size_un= it> =3D 15638478s<= /span> + (2 -1)s =3D 15638479s.

However exhibited Disk /dev/sdc size is 15638480s. Regards R= .T.
--000000000000bee43e05819c1f6d-- From unknown Tue Sep 09 21:32:48 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Ricky Tigg Subject: bug#34430: closed (Re: bug#34430: GNU Parted 3.2 =?UTF-8?Q?=E2=80=93?= Disks' sizes calculation model may be incorrect) Message-ID: References: <20190211183858.GF4594@lister.brianlane.com> X-Gnu-PR-Message: they-closed 34430 X-Gnu-PR-Package: parted Reply-To: 34430@debbugs.gnu.org Date: Mon, 11 Feb 2019 18:40:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1549910402-30905-1" This is a multi-part message in MIME format... ------------=_1549910402-30905-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #34430: GNU Parted 3.2 =E2=80=93 Disks' sizes calculation model may be inco= rrect which was filed against the parted package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 34430@debbugs.gnu.org. --=20 34430: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D34430 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1549910402-30905-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 34430-done) by debbugs.gnu.org; 11 Feb 2019 18:39:07 +0000 Received: from localhost ([127.0.0.1]:44093 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gtGTz-00080Z-IE for submit@debbugs.gnu.org; Mon, 11 Feb 2019 13:39:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gtGTy-000805-7e for 34430-done@debbugs.gnu.org; Mon, 11 Feb 2019 13:39:06 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BB268432A2 for <34430-done@debbugs.gnu.org>; Mon, 11 Feb 2019 18:39:00 +0000 (UTC) Received: from lister.brianlane.com (ovpn-112-38.phx2.redhat.com [10.3.112.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 595B05D96F for <34430-done@debbugs.gnu.org>; Mon, 11 Feb 2019 18:39:00 +0000 (UTC) Date: Mon, 11 Feb 2019 10:38:58 -0800 From: "Brian C. Lane" To: 34430-done@debbugs.gnu.org Subject: Re: bug#34430: GNU Parted =?utf-8?Q?3=2E2_?= =?utf-8?B?4oCT?= Disks' sizes calculation model may be incorrect Message-ID: <20190211183858.GF4594@lister.brianlane.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 11 Feb 2019 18:39:00 +0000 (UTC) X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 34430-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) Disks start at partition 0. But you can't use it because then you'd be overwriting the MBR. -- Brian C. Lane (PST8PDT) ------------=_1549910402-30905-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 11 Feb 2019 10:54:08 +0000 Received: from localhost ([127.0.0.1]:43185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gt9Dz-0004Q4-N9 for submit@debbugs.gnu.org; Mon, 11 Feb 2019 05:54:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33351) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gt9Dx-0004PV-HO for submit@debbugs.gnu.org; Mon, 11 Feb 2019 05:54:05 -0500 Received: from lists.gnu.org ([209.51.188.17]:39528) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gt9Dr-0003Lo-6w for submit@debbugs.gnu.org; Mon, 11 Feb 2019 05:54:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gt9Dq-0006Xu-9e for bug-parted@gnu.org; Mon, 11 Feb 2019 05:53:59 -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,FREEMAIL_FROM, HTML_MESSAGE autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gt9Do-0003KX-Ba for bug-parted@gnu.org; Mon, 11 Feb 2019 05:53:58 -0500 Received: from mail-ot1-x32f.google.com ([2607:f8b0:4864:20::32f]:37471) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gt9Do-0003J7-5L for bug-parted@gnu.org; Mon, 11 Feb 2019 05:53:56 -0500 Received: by mail-ot1-x32f.google.com with SMTP id b3so543866otp.4 for ; Mon, 11 Feb 2019 02:53:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=1nbVimbWY0nWxOyBHule5Z6/6FKgWEsza245iEsVjV4=; b=M+bD88KW9+O8iHDSwE+joMEhEncwt5a/Xx7/6cxq0RuWAcJlPprJkm2osupOUl0fU9 MUvnrdl7qJv+IQ5q5PTP9dxDTiORi3MEOm/QaOQN/M+qVmYbt0mcV1cmGlDpIAiNvgdW rvFZnU+fZK9E+oRyg7XOZBhIc1gmk9I1MH2V7oqDNLgjOpemMgcj+4e/yoVSoMJK08mF +SEV80Yxu1SsB+vKNJhIZlr2YocbZ59HjYcfvTb3sYn2EgrTpW97K/nDvChIONXKVlDu g/Us0Dux9PWI7kKK3vbwqx0gnrRveSYhgYmH5WHMscNsOb7yJAmk1yL7cuRa54BYqnzu 4euQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=1nbVimbWY0nWxOyBHule5Z6/6FKgWEsza245iEsVjV4=; b=rcZOumSs0/VffZm0Ed7ZKmqC0oIjlBPqOXVzqq8l/p4pXGSfDdhLjP4h6NOjkAwEUq WwHchBlLmKTTRFrFvDRoeUhKwfySdpQdQ3KDrk5HQ44AKLinHTrU/CyrSLJiI/H/EbZa RH2bapkLENL07ohHSzSej3bya1aUp3PKqZJ6hpPhvtHR6MkzoFETQeozAIA+BEVBMm6q LX5KHkYMxrGNgFk+iICS37QVna6yV9goY8tAISQzEIkUw+gR88+quAx5zFVsKL9SJUht 9TS66bmmX2UOetLbXsh8NY56aaQ+kIqUPiXBihXcixABBtmQgCuY/GOVbY99H+pJ8oN8 eSkQ== X-Gm-Message-State: AHQUAuab42xbY8wdPu/rWOEpb4lgv9BvAprMwY29n11n0jhM9RIJQM58 Dm4LL4zYD3gciKndLhZYG5HszSc7aDEvfuRpNrIAITUffKI= X-Google-Smtp-Source: AHgI3IZ1Kh5dYHOheCGAE+I75hLYVbu8VFwFPl6ZZJQU59AHNo7Ehrroo4UapZ9qRELqQgZ4IdllUAfWMkf4Re0bLLI= X-Received: by 2002:a9d:7841:: with SMTP id c1mr2255214otm.354.1549882431037; Mon, 11 Feb 2019 02:53:51 -0800 (PST) MIME-Version: 1.0 From: Ricky Tigg Date: Mon, 11 Feb 2019 11:53:36 +0100 Message-ID: Subject: =?UTF-8?Q?GNU_Parted_3=2E2_=E2=80=93_Disks=27_sizes_calculation_model_ma?= =?UTF-8?Q?y_be_incorrect?= To: bug-parted@gnu.org Content-Type: multipart/alternative; boundary="000000000000bee43e05819c1f6d" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::32f X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --000000000000bee43e05819c1f6d Content-Type: text/plain; charset="UTF-8" Hi. Commands executed: # dd if=/dev/zero of=/dev/sdc # parted /dev/sdc (parted) unit s print free Error: /dev/sdc: unrecognised disk label Model: (...) (scsi) Disk /dev/sdc: 15638480s Sector size (logical/physical): 512B/512B Partition Table: unknown Disk Flags: (parted) mktable msdos (parted) unit s print free Disk /dev/sdc: 15638480s Partition Table: msdos Number Start End Size Type File system Flags 2s 15638479s 15638478s Free Space Disks' sizes calculation model, involved in the calculation of values related to disks, appears to be incorrect. Here an illustration from above output, assuming that disks start from sector 1; according to that assumption correct calculation model regarding disks' sizes is expected to be: Disk = *Size* + (Start - *1* = 15638478s + (2 -1)s = *15638479s*. However exhibited Disk /dev/sdc size is 15638480s. Regards R.T. --000000000000bee43e05819c1f6d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi. Commands executed:

# dd if=3D/dev/zero of=3D/dev/sdc

# par= ted /dev/sdc
(parted) unit s print free
Error: /dev/sdc: unrecognised= disk label
Model: (...) (scsi)=C2=A0=C2=A0
Disk /dev/sdc: 15638480s=
Sector size (logical/physical): 512B/512B
Partition Table: unknownDisk Flags:=C2=A0

(par= ted) mktable msdos=C2=A0
(parted) unit s print free=C2=A0

Disk /dev/sdc: 15638480s
P= artition Table: msdos

Number=C2=A0 Start=C2=A0 End=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 Size=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Type=C2=A0 File system=C2=A0 F= lags
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 2s=C2=A0=C2=A0=C2=A0=C2= =A0 15638479s=C2=A0 15638478s=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Fre= e Space

Disks' sizes= calculation model, involved in the calculation of values related to disks,= appears to be incorrect. Here an illustration from above output, assuming = that disks start from sector 1; according to that assumption correct calcul= ation model regarding disks' sizes is expected to be:

Disk <path>= ; =3D Size=C2=A0+ (Start - 1<size_un= it> =3D 15638478s<= /span> + (2 -1)s =3D 15638479s.

However exhibited Disk /dev/sdc size is 15638480s. Regards R= .T.
--000000000000bee43e05819c1f6d-- ------------=_1549910402-30905-1--