Logical block addressing

Logical block addressing

Logical block addressing (LBA) is a common scheme used for specifying the location of blocks of data stored on computer storage devices, generally secondary storage systems such as hard disks. The term LBA can mean either the address or the block to which it refers. Logical blocks in modern computer systems are typically 512 or 1024 bytes each. ISO 9660 CDs (and images of them) use 2048-byte blocks.

The LBA scheme

LBA is a particularly simple addressing scheme; blocks are located by an index, with the first block being LBA=0, the second LBA=1, and so on. The LBA scheme replaces earlier schemes which exposed the physical details of the storage device to the software of the operating system. Chief among these was the cylinder-head-sector (CHS) scheme, where blocks were addressed by means of a tuple which defined the cylinder, head, and sector at which they appeared on the hard disk. CHS didn't map well to devices other than hard disks (such as tapes and networked storage), and was generally not used for them. CHS was used in early MFM and RLL drives, and both it and its successor Extended Cylinder-Head-Sector (ECHS) were used in the first ATA drives.

SCSI introduced LBA as an abstraction. While the drive controller still addresses data blocks by their CHS address, this information is generally not used by the SCSI device driver, the OS, filesystem code, or any applications (such as databases) that access the "raw" disk. System calls requiring block-level I/O pass LBA definitions to the storage device driver; for simple cases (where one volume maps to one physical drive), this LBA is then passed directly to the drive controller.

LBA mapping and LUN virtualization

For more complex cases (particularly RAID devices and SANs and where logical drives (LUNs) are composed via LUN virtualization and aggregation), LBAs are translated from the application's model of the disk to that used by the actual storage device. In complex deployments, particularly when a storage fabric is employed, several of these LBA translations may occur between the dispatching application and the final, remote, disk.

CHS to LBA conversion

C-H-S tuples can be converted to LBA addresses using the following formula:

LBA = (C * heads * spt) + (H * spt) + (S - 1)

LBA to CHS mapping

LBA addresses can be mapped to C-H-S tuples using the following formulae:

C = (LBA - S + 1) / (heads * spt) H = (LBA - S + 1) % (heads * spt) / spt S = LBA % spt + 1

(start by calculating 'S', as for simplicity it is used for calculating 'C' and 'H')

where - 'LBA' is the logical block address - 'heads' is the total number of logical heads - 'spt' is the number of logical sectors per track - '/' is the division operator and '%' is the modulo operator

Note: the total number of cylinders does not enter into any calculation.

LBA, ATA devices and Enhanced BIOS

The first formal definition of the ATA interface inherited the CHS scheme from earlier drive standards. This proved to be a limiting factor as ATA drives grew. Originally cylinder, head, and sector were limited to 1024, 16, and 63 respectively. Later, more advanced BIOS implementations (known sometimes as Enhanced BIOS) that virtualised the CHS mapping (often generating many more "virtual" drive heads than the physical disk really possessed) expanded this limit to 1024, 255, and 63. This meant an MS-DOS volume (and a Windows NT 4.0 system partition) was limited to 7.8 GiB.

The second ATA standard (ATA-2) introduced an LBA mode of operation, which has subsequently become the most commonly used scheme when communicating with ATA drives and their technical successors. LBA addresses in ATA can be 28-bit or 48-bit (introduced in ATA-6) wide, which results in a disk size limit of 128 GiB or 128 PiB, respectively, assuming the common 512 bytes per sector.

External links

* [http://www.dewassoc.com/kbase/hard_drives/lba.htm LBAs explained]
* [http://www.boot-us.com/gloss11.htm LBA and CHS format, LBA mapping]
* [http://support.microsoft.com/kb/q224526/ Microsoft article on 7.8GB limit on NT 4.0]
* [http://www.48bitlba.com/ 48bitLBA.com] Source for 48-bit LBA Information
* [http://www.dewassoc.com/kbase/hard_drives/drive_size_barrier_limitations_2.htm Hard Drive Size Limitations and Barriers]


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • Logical Block Addressing —  Cet article concerne la méthode d’adressage informatique. Pour d’autres sens de l’abréviation, voir LBA. L’adressage en LBA (abréviation de Logical Block Addressing en anglais soit « Adressage par bloc logique » en français) est… …   Wikipédia en Français

  • Logical Block Addressing — Logical Block Addressing,   LBA …   Universal-Lexikon

  • Logical block addressing — Le LBA, ou Logical Block Addressing (« Adressage par bloc logique », en anglais) est historiquement un moyen d’adresser les secteurs d un disque dur. Cette méthode d’adressage a ensuite été généralisée à un grand nombre de médias de… …   Wikipédia en Français

  • Logical block addressing — Para otros usos de este término, véase LBA (desambiguación). Logical block addressing (LBA: direccionamiento de bloque lógico) es un método muy común usado para especificar la localización de los bloques de datos en los sistemas de almacenamiento …   Wikipedia Español

  • Logical Block Addressing — Der Begriff Logische Blockadressierung (LBA) oder englisch Logical Block Addressing bezeichnet eine Adressierungsmethode bei ATA Festplatten. Inhaltsverzeichnis 1 Grundlagen 2 Unterstützung in Betriebssystemen 2.1 Situation bei älteren… …   Deutsch Wikipedia

  • Logical block addressing — …   Википедия

  • Logical Block Addressing — allocation of unique digital addresses (that allow access by input/output) to various sectors on the hard drive, LBA …   English contemporary dictionary

  • Storage block — A storage block is a physical sector on the surface of a disk or diskette. It is the smallest unit of transference between the main memory and a given disk drive.In the IBM mainframe terminology, a block is the minimal physical division of data… …   Wikipedia

  • Cylinder-head-sector — Cylinder head sector, also known as CHS, was an early method for giving addresses to each physical block of data on a hard disk drive. In the case of floppy drives, for which the same exact diskette medium can be truly low level formatted to… …   Wikipedia

  • Hard disk drive — Hard drive redirects here. For other uses, see Hard drive (disambiguation). Hard disk drive Mechanical interior of a modern hard disk drive Date invented 24 December 1954 [1] …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”