In Linux, how many superblocks are there per file system?

2.9k Views Asked by At

I understand that superblocks provide high-level meta data about file systems in Linux, but how many of these structures exist for a given file system? My intuition tells me there's either one per file system, or one per file.

2

There are 2 best solutions below

2
On BEST ANSWER

I recently learned that there is more than one copy of the superblock within each file system. In ext2, for example, every block group has its own superblock with identical content to the other block groups. This redundancy provides reliability in the event of a crash. So in this system, there are as many superblocks as block groups.

1
On

Superblock is per filesystem, not per file. There might be multiple redundant copies of superblock in a single filesystem, but primary superblock will be referred every time. Redundant copies will be used in case of corruption of primary superblock only.