Logical block addressing

Also known as: LBA

On this page 7

Logical block addressing (LBA) is the scheme that identifies every addressable block on a storage device by a single sequential number, starting at LBA 0 and counting up to the last block of the disk. Instead of telling a drive which cylinder, head and sector to read, the operating system simply requests a block number, and the drive firmware translates it to a physical location.

In operating systems, LBA is the foundation on which partition tables, file systems and boot code are built. Partition entries in MBR and GPT, file system structures and disk images all express positions as LBA values, which makes the scheme central to OS storage on every modern desktop platform.

How logical block addressing works

LBA works by presenting the device as a flat, linear array of blocks of equal size. The host sends a command containing a starting LBA and a block count, and the controller or firmware decides where those blocks physically reside on platters or flash memory.

This abstraction hides the physical layout entirely. On a hard disk drive, the firmware maps LBAs to zones with varying sector counts per track and remaps defective sectors to spare areas. On a solid-state drive, the flash translation layer maps LBAs to constantly changing flash pages because of wear leveling and garbage collection.

The table below lists the key quantities that define an LBA address space.

ParameterMeaningTypical values
Logical block sizeSize of one addressable block reported to the host512 or 4,096 bytes
Physical sector sizeInternal unit the media actually writes4,096 bytes on modern drives
Maximum LBAHighest valid block numberTotal capacity divided by block size, minus one
Address widthNumber of bits available for the LBA field28 or 48 bits in ATA, 64 bits in NVMe
Transfer lengthBlocks requested in one commandFrom 1 up to the device limit
Key parameters of an LBA address space

From CHS geometry to LBA

LBA replaced cylinder-head-sector (CHS) addressing, in which software specified a physical coordinate on the disk. CHS tied operating systems to drive geometry, and the combined limits of the BIOS interface and the ATA standard capped usable capacity at about 504 MiB, later extended to roughly 8 GB through geometry translation.

Drives began reporting fake geometries that no longer matched their physical structure, so CHS became a fiction maintained for compatibility. LBA removed that fiction by letting the host ignore geometry completely. The conversion formula is LBA = (C × heads per cylinder + H) × sectors per track + (S − 1).

AspectCHS addressingLogical block addressing
Address formThree coordinatesOne block number
Dependence on geometryRequired, often emulatedNone
Defect handlingVisible to softwareHidden by firmware remapping
Capacity limitAbout 8 GB with translationExabytes with 48-bit or wider fields
Use todayLegacy MBR fields onlyUniversal
CHS and LBA compared

Address width and capacity limits

The capacity reachable through LBA depends on how many bits store the block number and on the logical block size. Several historical barriers came from the address width of a specific interface or data structure rather than from the drives themselves.

Address fieldWhere it is usedLimit at 512-byte blocksLimit at 4 KiB blocks
28-bit LBAOriginal ATA commands128 GiB1 TiB
32-bit LBAMBR partition entries2 TiB16 TiB
48-bit LBAATA-6 and later128 PiB1 EiB
64-bit LBAGPT entries, SCSI, NVMe8 ZiB64 ZiB
LBA width and resulting capacity limits

The 2 TiB MBR limit is the most practical barrier today. Because MBR stores the start and length of each partition as 32-bit LBA values, disks larger than 2 TiB need GPT to use their full capacity with 512-byte sectors.

Sector sizes, emulation and alignment

Modern drives commonly use 4,096-byte physical sectors while still exposing 512-byte logical blocks for compatibility, a format known as 512e (512-byte emulation). Drives that expose 4,096-byte logical blocks directly are called 4Kn (4K native).

FormatLogical blockPhysical sectorConsequence
512n512 bytes512 bytesLegacy, simple mapping
512e512 bytes4,096 bytesEight LBAs per physical sector
4Kn4,096 bytes4,096 bytesNeeds OS and firmware support
Common drive formats and their LBA behavior

On 512e drives, a partition that starts at an LBA not divisible by eight causes read-modify-write cycles, because each file system cluster straddles two physical sectors. This is why current partitioning tools start the first partition at LBA 2048, a 1 MiB boundary that satisfies partition alignment on both hard disks and SSDs.

Where operating systems use LBA values

Operating systems use LBA values at every layer of the storage stack, from boot firmware to file system metadata. Knowing where these values appear helps when recovering partitions, inspecting disk images or diagnosing boot problems.

  • LBA 0 holds the MBR or, on GPT disks, a protective MBR.
  • LBA 1 holds the primary GPT header, and a backup header occupies the last LBA of the disk.
  • Partition entries record the first and last LBA of each partition.
  • File systems translate their cluster numbers to LBAs by adding the partition offset.
  • TRIM and UNMAP commands tell SSDs which LBA ranges no longer hold valid data.

A frequent mistake is treating an LBA as a fixed physical position. On SSDs and remapped hard disks, the same LBA can move physically over time, so overwriting a block number does not guarantee the old data is physically erased.

The simple explanation

Logical block addressing gives every small piece of a disk a house number, starting at zero. When the computer wants some data, it asks for block number 5,000 rather than describing exactly where on the disk that block sits.

The drive keeps its own map of where each numbered block really lives. This means the computer does not need to know how the disk is built inside, and the drive can quietly move or replace damaged areas without anyone noticing.

How it is used in practice

A technician clones an old 1 TB hard disk to a new 4 TB drive and finds that Windows shows only about 2 TB as usable. The disk uses an MBR partition table, whose 32-bit LBA fields cannot describe space beyond 2 TiB with 512-byte sectors.

The technician converts the disk to GPT with a built-in conversion tool, switches the firmware to UEFI boot and extends the system partition. The new layout starts the first partition at LBA 2048 for correct alignment, and the full 4 TB becomes available. The result is a bootable system using the whole drive, with no reinstallation and no data loss.