John Mellor composed on 2024-01-10 12:31 (UTC-0500):

> Almost all NVMe drives use 4k sectors.  Its actually hard on the drive 
> to use 512 byte sectors, as when you write a block and sync it, it has 
> to read and then rewrite the rest of the 4k block. That's unnecessary 
> writes, shortening your drive life.  Most Linux platforms will read the 
> natural sector size from the drive when you format it, so using 512 byte 
> sectors is pretty rare these days, unless you forced it of course.

# fdisk -l /dev/nvme0n1
Disk /dev/nvme0n1: 119.24 GiB, 128035676160 bytes, 250069680 sectors
Disk model: ZTC-PCIEG3-128G
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xdf5ee151

Device          Boot     Start       End   Sectors  Size Id Type
/dev/nvme0n1p1            2048    516095    514048  251M  6 FAT16
...
# fdisk -l /dev/nvme0n1
Disk /dev/nvme0n1: 238.47 GiB, 256060514304 bytes, 500118192 sectors
Disk model: TEAM TM8FP6256G
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 5B330B05-5C88-4DF5-8359-67FF3E52CDC4

Device              Start       End  Sectors  Size Type
/dev/nvme0n1p1       2048    657407   655360  320M EFI System
...
# fdisk -l
Disk /dev/nvme1n1: 476.94 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: Patriot M.2 P300 512GB
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 5B330B05-5C88-4DF5-8359-67FF3E52CDC4

Device              Start       End  Sectors  Size Type
/dev/nvme1n1p1       2048    657407   655360  320M EFI System
...
Disk /dev/nvme0n1: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: PNY CS1030 500GB SSD
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 6369E8D7-0B94-4DF5-818C-2CD1A3A780CF

Device              Start       End  Sectors  Size Type
/dev/nvme0n1p1       2048    657407   655360  320M EFI System
...
All 4 report optimal 512. Is fdisk wrong?
-- 
Evolution as taught in public schools is, like religion,
        based on faith, not based on science.

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata
--
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to