Saturday, April 28, 2012

What is LBA ?

LBA (Logical Block Addressing)
In LBA, data area only depends on the head, cylinder (track) and sector in which data is located. Head, cylinder and sector are directly used to address disk (it is called CHS addressing) in early systems. The 3 parameters (3D parameters) of every location need to store respectively. And they are read respectively when used. Then they are sent to disk controller. The system uses 8B to store head address, 10B to store cylinder address and 6B to store sector address and a sector is 512B totally. Therefor, the maximum capacity of a disk using CHS addressing is 256 * 1024 * 63 * 512B = 8064 MB (1MB = 1048576B) (if 1MB=1000000B, the capacity is 8.4GB). Along with the development of disk technology, the capacity of hard disk becomes larger and larger. As the CHS type can not manage disk exceeding 8064MB, engineers develop the LBA addressing type which is more convenient. In LBA, address does not stand for the actual physical address (cylinder, head and sector) in an actual disk. LBA transfers CHS from three-dimensional addressing to one-dimensional linear address. It converts C/H/S numbers of all physical sectors into linear numbers through certain rules, which improves the efficiency of system and avoid the complicated C/H/S addressing. When the hard disk is visited, the hard disk controller will transfer this logical address into physical address of actual disk.

Disk Mode
The LARGE is adopted when the cylinders are more than 1024 and not supported by LBA. The number of cylinders is divided by 2 and number of heads multiplies 2 to and total capacity of disk is the same. This method is adopted in LARGE.
Among those three disk modes, LBA is used mostly.
The conversion between LBA and C/H/S:
Suppose that NS is numbers of sectors in every track, and NH is numbers of heads and C, H, S respectively stand for number of cylinder, head and sector, and LBA stands for logical sector number, div is division calculation and mod is remainder calculation, then:
  C=(LBA div NS)div NH;
  H=(LBA div NS)mod NH;
  S=(LBA mod NS)+1
  For example, if LBA = 0 then CHS = 0/0/1
  The calculation formula from C/H/S to LBA:
However, no matter which accessing type is set in BIOS, MiniTool Partition Wizard is in support of disk partition management of corresponding types. Although the addressing modes are different, MiniTool Partition Wizard can manage disk partition as well. 

For more information:

No comments:

Post a Comment