How does a file-system block gets translated to lba?

1.1k Views Asked by At

I understand a file-system can choose the size of blocks it uses on the disk. On the other hand i understand that the disk is divided into LBA's. The LBA is an address of a sector on the disk. So whats the connection between the block used by the file system and the disk sectors (lba)?

Is there some kind of translation from a fs block and lba? Is it different from fs to fs? where can i read more about this?

thanks

1

There are 1 best solutions below

0
On

Yes. File system usually sees a a continuous logical space without knowledge of the spindles underneath, thus it doesn't know disk LBA either. The translation work is usually done in a layer called volume, which is to hide the disk detail and present the file system a logically continuous space. For example, in Linux there's LVM (Logical Volume Manager) playing such roles.

The volume exposed to fs might not be disks. It could be constructed upon other volumes, thus sometimes come up with a very large disk.

The volume could also provide the functionality of RAID, which put several disks together that could relieve you from disk failure in some extent at the expense of performance and space efficiency.

Some file systems can manage disks directly and operate on raw disks, thus no layer of volume. As far as I know, NETAPP's WAFL is doing in that way.