Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch LBA format (sector size) before formatting #3166

Open
technobirb opened this issue Feb 9, 2025 · 0 comments
Open

Switch LBA format (sector size) before formatting #3166

technobirb opened this issue Feb 9, 2025 · 0 comments

Comments

@technobirb
Copy link

technobirb commented Feb 9, 2025

describe the request

Most consumer SSDs ship with 512B emulation by default, even though they support 4k native. Arch installation guide has a tip about checking the optimal logical sector size before partitioning.

# nvme id-ns -H /dev/nvme0n1 | grep "LBA Format"
LBA Format  0 : Metadata Size: 0   bytes - Data Size: 512 bytes - Relative Performance: 0x2 Good (in use)
LBA Format  1 : Metadata Size: 0   bytes - Data Size: 4096 bytes - Relative Performance: 0x1 Better
# nvme format --lbaf=1 /dev/nvme0n1

This also affects the sector size LUKS will use, which can benefit performance. [1] [2]

P.S.
A few NVME SSDs may not support the format command, check with:

# nvme id-ctrl -H /dev/nvme0n1
oacs      : 0x17
  [1:1] : 0x1	Format NVM Supported
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant