educative.io

How metadata is related to inodes of ext4 file system?

Hi Guys, Thanks for the excellent tutorial on SD. I am trying to connect this to the typical ext4 filesystem used in our PC.

AFAIU, in ext4 FS, the whole Hard disc or memory device is divided into equal sized like blocks like 4K. For every file, a inode is created which in turn stores the contents of files in the blocks of hard drive. These block details are stored in the inode.

Is the metadata concept designed here similar to inodes of ext4? But, in the cloud, how the blocks are identified - HDD#/Cylinder#/Sector#/Block#?

Please clarify

1 Like

Thanks Mohammed Hanifa,

This a good question and, in general, you can assume that there is no difference between a cloud and a file storage system. So whenever a client wants to read a file, it calls some API of the distributed file system. This API should have at least three things ‘file path’, ‘start index’, and ‘length’ - this translates into - give me ‘length’ bytes of ‘file path’ starting from ‘index’. These three parameters can easily map this request to a storage server and the block where the file is stored.

Hope this answers your question.

1 Like