What is File System Block And Super Block?
Block is segment of data that contains data for file, binary, dll,metadata etc. Block are used to store information about files. Some blocks hold metadata about file system and called super block.
Super block is segment of metadata that contains information about the file system on a block device. Super block provides
- size of the file system
- block size of the file system
- empty or filled blocks of the file system
- size and allocation of inode tables
To access a file in a file system requires access to the super block to get information about the file. Super block is backed up into multiple areas of a disk.
List Super Block and Backups
We can list super block backups with dumpe2fs
$ sudo dumpe2fs /dev/vda1 | grep -i superblock
dumpe2fs 1.43.3 (04-Sep-2016)
Primary superblock at , Group descriptors at 1-8
Backup superblock at 32768, Group descriptors at 32769-32776
Backup superblock at 98304, Group descriptors at 98305-98312
Backup superblock at 163840, Group descriptors at 163841-163848
Backup superblock at 229376, Group descriptors at 229377-229384
Backup superblock at 294912, Group descriptors at 294913-294920
Backup superblock at 819200, Group descriptors at 819201-819208
Backup superblock at 884736, Group descriptors at 884737-884744
Backup superblock at 1605632, Group descriptors at 1605633-1605640
Backup superblock at 2654208, Group descriptors at 2654209-2654216
Backup superblock at 4096000, Group descriptors at 4096001-4096008
Backup superblock at 7962624, Group descriptors at 7962625-7962632
Backup superblock at 11239424, Group descriptors at 11239425-11239432
- Primary super block is at 0
- Backup super blocks are separated to the different locations of the disk
List Details Of Blocks
We can use dumpe2fs tool to list all block information. But this will create a lot of output.
$ sudo dumpe2fs /dev/vda1