| Summary: | partitionmanager Nvme SSD's sector size is not autodetected for megabyte alignment | ||
|---|---|---|---|
| Product: | [Applications] partitionmanager | Reporter: | Shmerl <shtetldik> |
| Component: | general | Assignee: | Andrius Štikonas <andrius> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | 24.12.0 | ||
| Target Milestone: | --- | ||
| Platform: | Debian testing | ||
| OS: | Linux | ||
| Latest Commit: | a599a4336d56e8dd1c8c0d379b44fd24ed4288d2 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
|
Description
Shmerl
2025-05-13 03:05:42 UTC
FYI, this still happens at least in the version in Debian testing. (In reply to Shmerl from comment #1) > FYI, this still happens at least in the version in Debian testing. Well,, cause so far nobody who has 4k device has sent a patch... At the moment all my drives have 512b sectors, perhaps if my next drive has large sectors, I can take a look. (In reply to Andrius Štikonas from comment #2) > > At the moment all my drives have 512b sectors, perhaps if my next drive has > large sectors, I can take a look. NVMe SSDs at least often have options for sector size. For instance I have SK hynix Platinum P41. Sector size can be checked like this: sudo nvme id-ns -H /dev/nvme0n1 | grep 'Relative Performance' LBA Format 0 : Metadata Size: 0 bytes - Data Size: 512 bytes - Relative Performance: 0 Best LBA Format 1 : Metadata Size: 0 bytes - Data Size: 4096 bytes - Relative Performance: 0 Best (in use) By default it was 512 for me. I set it to 4KiB like this: sudo nvme format --lbaf=1 /dev/nvme0n1 You can check if you drive has such option too, even if it's not using it out of the box. Note that changing sector size deletes all data on the drive, so do it with a spare one that you can experiment with. (In reply to Shmerl from comment #3) > (In reply to Andrius Štikonas from comment #2) > > > > At the moment all my drives have 512b sectors, perhaps if my next drive has > > large sectors, I can take a look. > > NVMe SSDs at least often have options for sector size. For instance I have > SK hynix Platinum P41. Sector size can be checked like this: > > sudo nvme id-ns -H /dev/nvme0n1 | grep 'Relative Performance' > LBA Format 0 : Metadata Size: 0 bytes - Data Size: 512 bytes - > Relative Performance: 0 Best > LBA Format 1 : Metadata Size: 0 bytes - Data Size: 4096 bytes - > Relative Performance: 0 Best (in use) > > By default it was 512 for me. I set it to 4KiB like this: > > sudo nvme format --lbaf=1 /dev/nvme0n1 > > You can check if you drive has such option too, even if it's not using it > out of the box. Note that changing sector size deletes all data on the > drive, so do it with a spare one that you can experiment with. Yeah, I already checked and unfortunately the only drive that had that option was is my root fs drive, so tricky to convert for reasons you mentioned. But I'll keep it in mind for my next purchases... (In reply to Shmerl from comment #3) > You can check if you drive has such option too Actually I did find a spare NVMe that has that option. I'll still need to do some data moving but a bit later I should be able to look at this. I've adjusted partition alignment here https://invent.kde.org/system/kpmcore/-/merge_requests/65 It needs a bit more testing though. In particular I still need to do some testing to make sure it doesn't break LVM. It's probably good to add a comment there, since this division by 512 is pretty obscure otherwise. |