[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: hdd partition alignment parted vs fdisk, partition 1 does not start on physical sector boundary, parted bug?



I could be an offset defined.
Could you post following files?

/sys/block/sdd/queue/optimal_io_size
/sys/block/sdd/queue/minimum_io_size
/sys/block/sdd/alignment_offset
/sys/block/sdd/queue/physical_block_size
/sys/block/sdd/queue/logical_block_size






Toni Mas

Missatge de Sergey Spiridonov <sena@s73.work> del dia dc., 4 de des.
2019 a les 13:30:
>
> Hi all
>
> I am trying to partition 14TB HDD and get the following problem with an
> alignment:
>
> # hdparam -I /dev/sdd tells that
>
>         Logical  Sector size:                   512 bytes
>         Physical Sector size:                  4096 bytes
>
>
> # parted -a opt /dev/sdd
>
> (parted) mkpart primary 0% 100%
> ...
>
> (parted) print
>
> Number  Start   End     Size    File system  Name     Flags
>  1      33,6MB  14,0TB  14,0TB               primary
>
> Now checking alignment:
>
> (parted) align-check opt
> 1 1 aligned
>
>
> So far, so good. Now let's look at the same disk with fdisk:
>
> # fdisk /dev/sdd
>
> : p
>
> Disk /dev/sdd: 12,8 TiB, 14000519643136 bytes, 27344764928 sectors
> Disk model: IB-366StU3+B
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 4096 bytes
> I/O size (minimum/optimal): 4096 bytes / 33553920 bytes
> Disklabel type: gpt
> Disk identifier: 82DD924B-BF0E-40FF-9037-1FD4E7307D26
>
> Device     Start         End     Sectors  Size Type
> /dev/sdd1  65535 27344740889 27344675355 12,8T Linux filesystem
>
> Partition 1 does not start on physical sector boundary.
>
>
> What? Why?
>
>
> man parted tells that
>
>    optimal
>                   Use optimum alignment as given by the disk
>                   topology  in‐ formation.  This  aligns  to  a
>                   multiple of the physical block size in a way that
>                   guarantees optimal performance
>
>
> 1. Probably parted detected physical sector size as 512
> instead of 4096? Why?
>
> 2. Even if parted thinks that physical sector is 512 instead of
> 4096, why start from 65535 and not from 65536? What is the logic
> behind? How using odd multiplier can improve performance?
>
> Is it a bug in parted or I am missing something?
> --
> Best regards, Sergey Spiridonov
>
>
>


Reply to: