Logical Block Addressing (LBA)

What is LBA (Logical Block Addressing)?

LBA, short for Logical Block Addressing, is the process of accessing hard drives larger than 528 MB by the computer systems by using a single sector number instead of the traditional and old school Cylinder, Head and Sector (CHS) method.

Technically, LBA is the method of stipulating the positions of the data blocks on the hard drives. In simple words, this is another useful way of addressing the hard disks. This addressing style uses integer indexes for marking the sectors on a disk.

Understanding LBA (Logical Block Addressing)

What is LBA (Logical Block Addressing)

Logical Block Addressing technique helps in addressing hard drives with larger storage capacities and marking the locations of the data blocks on the disks in a much more organized manner. This allows better, if not faster, access.

Though generally used for the secondary storage devices such as hard disks, it is the effectiveness and utility of the Logical Block addressing technique that have replaced the traditional CHS scheme, which is known for its significant limitations.

The technique helps the hosts a lot because it provides a simple linear address space for them to locate it easily, and all they have to do is provide it. They do not need to know anything about the physical positions of the sectors.

The LBA scheme was designed for the first time for the Small Computer System Interface (SCSI) drives.

In the early 1990s, Logical Block Addressing technique was designed to support the Integrated Drive Electronics (IDE) and the Advanced Technology Attachment (ATA) drives once these came with 500 MB of storage space.

It also resulted in a much-improved BIOS in which the computer translated the CHS addressing mode into LBA.

Over time, as technology progressed and the designs of the storage systems changed, the support offered by the ATA specifications grew to 8.4 GB, 128 GB and even more.

In the IDE standard, 22-bit Logical Block Addressing was included as an option, initially, but it was extended up to 28 bits when the ATA-1 was released in 1994.

Then again, it was further extended up to 48 bits when, in 2003, the ATA-6 was released.

However, the size of the data entered on the disk and in the memory were stored in an address that was normally either 32 bits or 64 bits.

The Logical Block Addressing scheme is implemented in almost every hard disk drive that has come up since 1996.

This particular form of addressing the hard disks is now more dominant due to the simple reason that it is much easier to work with as compared to the conventional CHS technique.

Therefore, the term LBA can indicate two things such as:

The scheme itself is also referred to as the Basic Input Output System (BIOS) INT 13h extensions drive geometry translation.

You can convert CHS into LBA by using a simple formula, which is explained in a later section of this article.

However, at this point, it is important to note a few specific facts such as:

However, fortunately, as said earlier, most of the newer hard disk drives do support LBA mode.

How to Find a Logical Block Address?

It is very easy to find a logical block address on a hard drive by using the unique number or integer indices assigned by the process to the sectors on the disk.

The lower the value of the LBA, the closer the physical sector of the first or the outermost cylinder of the hard drive will be.

You can also find it by using a formula that involves the heads, cylinders, and sectors of the disk. This is actually the formula used for mapping the CHS tuples to the LBA address, which is as follows:

Read Also:  What is eMMC Storage? Function, Lifespan, Pros & Cons

LBA = (C × HPC + H) × SPT + (S − 1).

Here, the different alphabets signify different things such as:

How Does Logical Block Addressing Work?

Logical Block Addressing typically works by mapping a particular CHS address by using a 28-bit value.

The LBA scheme helps a lot in marking the data blocks stored on the secondary storage systems such as the Hard Disk Drives (HDDs).

This is an easy linear addressing scheme where the data blocks are indicated by a specific integer index.

The most significant aspect of the working process of the Logical Block Addressing scheme is that it allocates a unique number to each sector for easier access to the hard drive than using the cylinder, head, and sectors.

The process of numbering happens as follows:

This way, the process goes on.

Utilizing this method, LBA addresses the entire hard disk as a large, single device. In this scheme, the existing blocks are simply counted starting with 0. According to this scheme, the first data block is identified as LBA 0, the next one as LBA 1, and so on.

This, in other words, means that LBA accesses the drives by addressing the sector addresses in a linear fashion.

This makes its working process as well as the entire addressing mode much simpler in comparison to the CHS technique.

CHS Vs LBA

Read Also:  What is Solid State Drive (SSD)? Function, Pros, Cons & More

Questions & Answers:

What is LBA Used for?

Typically, the Logical Block Addressing method is used to address the blocks of data stored on a hard disk in a better way.

The location of the data blocks on the computer storage systems is specified by unique integer indexes. This allows easier and faster access to the specific data block as and when required.

What is the LBA Sector?

The LBA sector on a hard disk refers to the smallest addressable unit. It typically has a fixed size of 512 bytes. LBA uses this logical block address to access the data and helps the drive to read from there or write fresh data to that particular sector.

What is LBA 0?

LBA 0 actually refers to the first sector of the hard disk that is partitioned. Ideally, LBA 0 is the same as CHS 0/0/1 and contains the Primary or Master Partition Table (MPT) as well as the Master Boot Record (MBR).

Which LBA is the First Usable Sector?

If you consider a 64-bit Windows operating system, there are 32 sectors or 16,384 bytes set aside for the Globally Unique Identifier or GUID Partition Table (GPT). This means that the first usable sector on the hard disk will be the LBA 34.

What is LBA Error?

An LBA error refers to a bad block. This is also called the bad logical block address, which is typically a result of logical data errors caused due to writing data erroneously on the disk of the hard drive.

Remember, irrespective of the errors in them, such writings on the disk may even be reported as successful.

Conclusion

Logical Block Addressing is a commonly used technique of hard drive addressing that uses a simple linear addressing method to mark the locations of the data blocks on the disk.

It is easy to identify due to the unique integer index. Most of the hard drives today support this simpler addressing mode than the CHS mode.