Understanding UNIX / Linux filesystem Superblock
admin
2023-02-03 23:00:06
0

This is second part of "Understanding UNIX/Linux file system", part I ishere. Let us take an example of 20 GB hard disk. The entire disk space subdivided into multiple file system blocks. And blocks used for what?

Unix / Linux filesystem blocks

The blocks used for two different purpose:

  1. Most blocks stores user data aka files (user data).

  2. Some blocks in every file system store the file system's metadata. So what the hell is a metadata?

In simple words Metadata describes the structure of the file system. Most common metadata structure are superblock, inode and directories. Following paragraphs describes each of them.

Superblock

Each file system is different and they have type like ext2, ext3 etc. Further each file system has size like 5 GB, 10 GB and status such as mount status. In short each file system has a superblock, which contains information about file system such as:

  • File system type

  • Size

  • Status

  • Information about other metadata structures

If this information lost, you are in trouble (data loss) so Linux maintains multiple redundant copies of the superblock in every file system. This is very important in many emergency situation, for example you can use backup copies to restore damaged primary super block. Following command displays primary and backup superblock location on /dev/sda3:
# dumpe2fs /dev/sda1 | grep -i superblock
Output:

Primary superblock at 0, Group descriptors at 1-7
Backup superblock at 32768, Group descriptors at 32769-32775
Backup superblock at 98304, Group descriptors at 98305-98311
Backup superblock at 163840, Group descriptors at 163841-163847
Backup superblock at 229376, Group descriptors at 229377-229383
Backup superblock at 294912, Group descriptors at 294913-294919
Backup superblock at 819200, Group descriptors at 819201-819207
Backup superblock at 884736, Group descriptors at 884737-884743
Backup superblock at 1605632, Group descriptors at 1605633-1605639
Backup superblock at 2654208, Group descriptors at 2654209-2654215
Backup superblock at 4096000, Group descriptors at 4096001-4096007
Backup superblock at 7962624, Group descriptors at 7962625-7962631
Backup superblock at 11239424, Group descriptors at 11239425-11239431
Backup superblock at 20480000, Group descriptors at 20480001-20480007
Backup superblock at 23887872, Group descriptors at 23887873-23887879


相关内容

热门资讯

首次突破 屡创新高!一组数字解... 2026年上半年我国GDP同比增长4.7%经济韧性持续彰显在已经出炉的经济数据中更值得关注的还有“含...
男主播卖惨,66岁患癌老太花光... 今年3月,沈阳66岁的张阿姨在家养病期间刷视频时,被一名IP属地为湖北的男主播吸引。该主播主打演唱经...
松下智能马桶盖不喷水怎么回事 松下智能马桶盖不喷水怎么回事1、有时候新买的马桶在安装的时候工人有时候会不会告诉你需要开进水阀的,智...
松下智能马桶盖不喷水 1、有时候新买的马桶在安装的时候工人有时候会不会告诉你需要开进水阀的,智能马桶都是带有进水阀的,如果...
智能马桶盖不喷水故障维修方法 如果是出水口不喷水,先检查下是不是里面没水,或者水管出问题了,水管故障问题需找专业的维修师傅维修;若...
马桶水箱盖子碎了能换么 不能,建议更换整个水箱。方法:先检查排污管及产品内通道是否有异物;确定固定蹲便的安装位置、高度以及将...
洗衣机e1是什么故障 洗衣机e1是什么故障出现这个代码时,是表示洗衣机的进水时间超长了,洗衣机的进水系统发生了问题,比如,...
阿联酋航空发文致歉 7月23日,阿联酋航空发布致歉信:原计划于7月22日从迪拜飞往上海的阿联酋航空EK302航班,因恶劣...
给“南海仲裁案”递刀子的美国人... 执笔/李小飞刀7月12日晚,菲律宾内格罗斯东方省锡布兰镇的一处公寓内,突然响起一阵枪声,美国海洋生物...
特朗普称沙特加入《亚伯拉罕协议... △美国总统特朗普(资料图)当地时间7月23日,美国总统特朗普在社交媒体“真实社交”上发文表示,美国能...