GNU bug report logs - #22497
parted math - Q2 and Q3 ?

Previous Next

Package: parted;

Reported by: Chris Johnson <cj <at> tothemax.us>

Date: Sat, 30 Jan 2016 22:48:03 UTC

Severity: normal

Done: Phil Susi <psusi <at> ubuntu.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Phil Susi <psusi <at> ubuntu.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#22497: closed (parted math  - Q2 and Q3 ?)
Date: Mon, 08 Feb 2016 13:56:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 8 Feb 2016 08:56:06 -0500
with message-id <56B89E76.3000708 <at> ubuntu.com>
and subject line Re: bug#22497: parted math - Q2 and Q3 ?
has caused the debbugs.gnu.org bug report #22497,
regarding parted math  - Q2 and Q3 ?
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
22497: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22497
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Chris Johnson <cj <at> tothemax.us>
To: bug-parted <at> gnu.org
Subject: parted math  - Q2 and Q3 ?
Date: Sat, 30 Jan 2016 17:03:49 -0500
[Message part 3 (text/plain, inline)]
# parted /dev/rdsk/c7t1d0p0
GNU Parted 2.3.0
Using /dev/rdsk/c7t1d0p0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit cyl
unit cyl
(parted) p
p
Model: Generic Ide (ide)
Disk /dev/rdsk/c7t1d0p0: 121601cyl
Sector size (logical/physical): 512B/512B
BIOS cylinder,head,sector geometry: *121601,255,63*.  Each cylinder is 
8225kB.
Partition Table: gpt

Number  Start      End        Size       File system  Name  Flags
 1      0cyl       121600cyl  121600cyl               zfs
 9      121600cyl  121601cyl  1cyl


*Question 2)*

Based on the parted information shown above, I would assume that the 
Total Sectors could be calculated thus:

                    121601 * 255 * 63 = 1953520065
Indeed, *g*parted  shows this value when you look at the disk device 
information.

Alas, when I switch to units of sectors I get a different value!!!

(parted) unit s
unit s
(parted) p
p
Model: Generic Ide (ide)
Disk /dev/rdsk/c7t1d0p0: 1953525168s <---------
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start        End          Size         File system  Name  Flags
 1      256s         1953508750s  1953508495s               zfs
 9      1953508751s  1953525134s  16384s



*Question 3)*

When I look at the information above where units are sectors, it is 
clear that the "End" sector number is the last sector being used in the 
partition.  This is supported in the above example by the fact that 
partition 9's first sector number is one higher than the End sector 
number of partition 1.

Alas, when looking at the information in units of cylinders, it seems 
like there is a change in meaning.

Number  Start      End        Size       File system  Name  Flags
 1      0cyl       121600cyl  121600cyl               zfs
 9      121600cyl  121601cyl  1cyl

If there are 121600 cylinders in partition 1  and the first of those is 
cylinder number 0, I would expect the ENDing cylinder number to be 121599.
This expectation would also seem reasonable given that the starting 
cylinder number for partition 9 is 121600.

Hmmm, perhaps what I am looking at is how parted displays information 
when partitions are not sized to end on a cylinder boundary?

It likely is the case that partition 1 does not nicely end with the last 
sector of cylinder 121599 but instead has some sectors in cylinder 
121600 and furthermore that partition 9's starting sector is also in 
cylinder 121600 ...
Is that what's going on here?

Given that this drive is SSD and the whole cylinder,head,sector thing is 
all a mirage, I assume there is no value to trying to align the 
partitions to cylinder boundaries.

Thanks for your insight.


[Message part 4 (text/html, inline)]
[Message part 5 (message/rfc822, inline)]
From: Phil Susi <psusi <at> ubuntu.com>
To: Chris Johnson <cj <at> tothemax.us>, 22497-done <at> debbugs.gnu.org
Subject: Re: bug#22497: parted math - Q2 and Q3 ?
Date: Mon, 8 Feb 2016 08:56:06 -0500
On 1/30/2016 5:03 PM, Chris Johnson wrote:
> It likely is the case that partition 1 does not nicely end with the last
> sector of cylinder 121599 but instead has some sectors in cylinder
> 121600 and furthermore that partition 9's starting sector is also in
> cylinder 121600 ...
> Is that what's going on here?
> 
> Given that this drive is SSD and the whole cylinder,head,sector thing is
> all a mirage, I assume there is no value to trying to align the
> partitions to cylinder boundaries.

Yes.  The bottom line is: don't use cylinder mode.  It is a 30 year old
anachronism that is now just a lie with no basis in reality.




This bug report was last modified 9 years and 165 days ago.

Previous Next


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