Subject: bug#27884: closed (Re: bug#27884: parted reports the partition is not optimally aligned, even though it's 1MiB-aligned)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 20 Sep 2017 14:03:02 +0000

Your bug report

#27884: parted reports the partition is not optimally aligned, even though it's 1MiB-aligned

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 [email-masked].

-- 
27884: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=27884
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#27884: parted reports the partition is not optimally aligned, even though it's 1MiB-aligned
From: Phil Susi <[email-masked]>
To: Alicia Boya García <[email-masked]>, [email-masked]
Date: Wed, 20 Sep 2017 10:02:49 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

On 9/20/2017 9:57 AM, Alicia Boya García wrote:
> Indeed.
> 
> This drive was advertising a ridiculous optimal_io_size that is not even
> a power of two (2^16-1 512-byte sectors). Unfortunately this seems to be
> the case with more Seagate drives:
> 
> http://lists.gnu.org/archive/html/bug-parted/2016-12/msg00002.html
> https://patchwork.kernel.org/patch/5249211/

You have to love drive firmware bugs, especially when the bastards never
fix them.

Subject: parted reports the partition is not optimally aligned, even though it's 1MiB-aligned
From: Alicia Boya García <[email-masked]>
To: [email-masked]
Date: Mon, 31 Jul 2017 00:46:34 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi.

Is there any explanation to this GNU parted output?

GNU Parted 3.2
Using /dev/sde
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit B                                                          
(parted) p                                                               
Model: Seagate M3 Portable (scsi)
Disk /dev/sde: 4000787029504B
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number  Start     End             Size            File system  Name  Flags
 1      1048576B  4000786153471B  4000785104896B  ext4

(parted) align-check                                                     
alignment type(min/opt)  [optimal]/minimal?                              
Partition number? 1                                                      
1 not aligned

Why does it say it's not aligned? Both the the start and the end are
1MB-aligned (and therefore trivially 4096B-aligned and 512B-aligned), am
I right?

In [1]: 1048576/4096
Out[1]: 256.0

In [2]: 4000785104896/4096
Out[2]: 976754176.0

For the record, at least it says it complies with "minimal" alignment:

(parted) align-check                                                     
alignment type(min/opt)  [optimal]/minimal? minimal                      
Partition number? 1                                                      
1 aligned

Regards,
Alicia.