Partition mapping, track layout & NVMe storage geometry
Storage device geometry and addressing mechanisms determine how partitions should be aligned for optimal I/O throughput and SSD longevity. This page covers Logical Block Addressing (LBA), 4Kn Advanced Format with 4096-byte native sectors, and Flash Translation Layers in solid-state drives.
1. Logical Block Addressing (LBA)
Storage devices present their media to the operating system as a linear sequence of indexed blocks using Logical Block Addressing (LBA):
- LBA 0 represents the first addressable block on the disk (containing the primary partition table header).
- LBA $N-1$ represents the final addressable block (housing the GPT backup header on GPT disks).
- The storage controller internally handles the translation between logical LBA numbers and physical media structures.
2. 4Kn Advanced Format (4096-byte Native Sectors)
For many years, block storage operated on 512-byte physical sectors. To improve storage density and error correction efficiency, the storage industry established the Advanced Format (AF) standard:
- 4Kn (4K Native): The drive physically reads, writes, and addresses blocks in native 4096-byte sectors.
- 512e (512 Emulation): The drive controller translates 512-byte logical requests into 4096-byte physical blocks. If a partition starts at a non-aligned sector, every 512-byte write forces an expensive Read-Modify-Write (RMW) operation across two physical 4K sectors.
3. Solid-State Storage & Flash Translation Layers (FTL)
Solid-state drives (SSDs) and PCIe NVMe devices store data in NAND Flash memory organized into Pages (4KB to 16KB) and Erase Blocks (1MB to 24MB, varying by NAND generation and TLC/QLC technology):
- NAND flash can read and write in pages, but erases can only be performed in entire erase blocks.
- The onboard Flash Translation Layer (FTL) manages wear leveling, garbage collection, and bad block mapping.
- Aligning all partition boundaries to exact 1 MiB (2048-sector) boundaries ensures that partition I/O aligns with internal erase blocks, maximizing performance and prolonging drive endurance.
Partitioning tools like fdisk and gdisk handle this alignment automatically (the fdisk walkthrough demonstrates it in practice). The FTL also benefits from periodic TRIM commands, which inform the controller about freed blocks; see TRIM & discard for configuration. You can measure the performance impact of alignment with the tools in the disk benchmarking guide.
Frequently asked questions
What is Logical Block Addressing (LBA)?
LBA presents storage media as a linear sequence of indexed blocks. LBA 0 is the first addressable block (containing the primary partition table header), and LBA N-1 is the final block (housing the GPT backup header on GPT disks).
What is 4Kn Advanced Format?
4Kn (4K Native) means the drive physically reads, writes, and addresses blocks in native 4096-byte sectors. 512e (512 Emulation) translates 512-byte logical requests into 4096-byte physical blocks, which can cause read-modify-write operations on misaligned partitions.
What is a Flash Translation Layer (FTL)?
The FTL is onboard firmware in SSDs and NVMe devices that manages wear leveling, garbage collection, and bad block mapping. It translates logical LBA numbers to physical NAND Flash pages and erase blocks.
Why should partitions be aligned to 1 MiB boundaries?
Aligning partition boundaries to 1 MiB (2048 sectors) ensures I/O aligns with internal NAND Flash erase blocks, which range from 1 MB to 24 MB. This maximizes performance and prolongs drive endurance.
What happens if a partition is misaligned on a 512e drive?
Every 512-byte write forces a read-modify-write operation across two physical 4K sectors. The drive must read the full 4K block, modify the 512-byte portion, and write it back, degrading performance.
What are NAND Flash pages and erase blocks?
NAND Flash in SSDs is organized into pages (4 KB to 16 KB) and erase blocks (1 MB to 24 MB, varying by NAND generation and TLC/QLC technology). Flash can read and write in pages but can only erase entire blocks.