The file
A disk is a long row of numbered blocks. A file system decides which blocks hold a file and how to find them again. Here notes.txt, 10,000 bytes, sits on two disks with 4 KiB blocks: FAT32 and ext4. It needs 3 blocks.
FAT32
FAT32 starts with a boot sector, then the file allocation table (FAT), then data clusters numbered from 2. The FAT has one entry per cluster. Each entry holds 0 (free), the next cluster of the same file, or end of chain.
A FAT directory is a list of 32-byte entries. NOTES.TXT's entry holds its name, its size and its first cluster: 5. There is no inode: everything FAT knows about the file sits in this entry.
For the rest, the kernel follows the chain in the FAT: entry 5 says 6, entry 6 says 9, entry 9 says end of chain. So the file lives in clusters 5, 6 and 9: a linked list kept in a table.
Now read byte 9000. 9000 ÷ 4096 = 2, so it is in the file's third cluster. FAT cannot jump there: it must follow 2 links, 5 to 6 to 9. In a big file, the walk grows with the offset.
ext4
ext4 splits the disk into block groups of 32,768 blocks (128 MiB). A group has a block bitmap, an inode bitmap, an inode table (inode 12 is one row in it) and data blocks. Some groups also keep a backup superblock and group descriptors.
An ext4 directory entry holds just a name and an inode number: notes.txt is inode 12. The size, owner, times and block map live in the inode. So two names can share one inode, a hard link, which FAT cannot do.
Inode 12's record (256 bytes) has room for four extents. One is enough: logical block 0, length 3, starting at block 40960. An extent says these 3 blocks sit side by side, instead of one pointer per block.
Byte 9000 is again block 2 of the file. The extent covers blocks 0 to 2, so the kernel adds: 40960 + 2 = 40962. No chain to walk, however far into the file the byte is.
To find free blocks, ext4 reads the block bitmap: one bit per block, 1 used, 0 free. Here 40958 to 40962 are used and 40963 is free. FAT keeps the same fact inside its table: a 0 entry, like FAT[8].
Compare
FAT: the directory gives the first cluster, the table links the rest. Simple, and readable almost everywhere. ext4: name, then inode, then extents, plus bitmaps. Random access is one sum, and one inode can have many names.
What happens
;; step 1/11 · two-disks file notes.txt size 10000 bytes block 4096 bytes (4 KiB) on both disks blocks ceil(10000 / 4096) = 3 left FAT32: directory entry -> table of next pointers right ext4: directory entry -> inode -> extents
The cluster numbers 5, 6 and 9, inode 12 and block 40960 are example values chosen to be typical; how the FAT file came to be split around clusters 7 and 8 is not shown. FAT calls a block a cluster. Both the cluster size and ext4's block size (1 to 64 KiB, typically 4 KiB) are fixed when the disk is formatted; this example uses 4 KiB on both.