什么是文件系统块和超级块?

Block is a segment of data that contains data for the file, binary, dll, metadata, etc. Block is used to store information about files. Some blocks hold metadata about file system and called superblock.

块是包含文件,二进制文件,dll,元数据等数据的数据段。块用于存储有关文件的信息。 一些块包含有关文件系统的元数据,称为超级块。

超级块 (Super Block)

The superblock is a segment of metadata that contains information about the file system on a block device. Superblock provides the following information about a file, binary, dll, metadata, etc.

超级块是元数据的一部分,其中包含有关块设备上文件系统的信息。 Superblock提供以下有关文件,二进制文件,dll,元数据等的信息。

  • 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

    inode表的大小和分配

To access a file in a file system requires access to the superblock to get information about the file. The superblock is backed up into multiple areas of a disk.

要访问文件系统中的文件,需要访问超级块以获取有关文件的信息。 将超级块备份到磁盘的多个区域中。

列出超级块和备份 (List Super Block and Backups)

We can list super block backups with dumpe2fs command. Backup superblocks will list with the group descriptors.

我们可以使用dumpe2fs命令列出超级块备份。 备份超级块将与组描述符一起列出。

$ sudo dumpe2fs /dev/sda1 | grep -i superblock
List Super Block and Backups
List Super Block and Backups
列出超级块和备份
  • The primary superblock is at 0

    主超级块位于0
  • Backup superblocks 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.

我们可以使用dumpe2fs工具列出所有块信息。 但这会产生很多输出。

$ sudo dumpe2fs /dev/vda1
List Details Of Blocks
List Details Of Blocks
列出块的详细信息
  • `Last mounted on` provides the last path the given file system is mounted which is `/` in this example.

    “最后安装在”提供给定文件系统的最后安装路径,在此示例中为“ /”。
  • `Filesystem UID` is the unique identifier about the file system

    “文件系统UID”是有关文件系统的唯一标识符
  • `Filesystem magic number` is the number which numbers the file system type

    “文件系统魔数”是对文件系统类型进行编号的数字
  • `Filesystem revision`

    文件系统修订
  • `Filesystem features` are the features provided by the filesystem

    “文件系统功能”是文件系统提供的功能
  • `Filesystem flags`

    文件系统标志
  • `Default mount options`

    `默认挂载选项`
  • `Filesystem state` show the health of the file system which is clean in this example.

    “文件系统状态”显示文件系统的运行状况,本示例中该文件系统是干净的。
  • `Errors behavior` will specify what will be done if some error occurs during mount

    “错误行为”将指定如果在挂载过程中发生一些错误将如何处理
  • `Filesystem OS type` shows the file system OS which is `Linux` in this case.

    “文件系统OS类型”显示文件系统OS,在这种情况下为Linux。
LEARN MORE  Linux KVM Libvirt Tutorial
了解更多Linux KVM Libvirt教程

翻译自: https://www.poftut.com/file-system-block-super-block/

  • 1
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值