inode定义 node 1 2 3 4 5 The inode (index node) is a data structure in a Unix-style file system that describes a file-system object such as a file or a directory. Each inode stores the attributes and disk block locations of the object's data. File-system object attributes may include metadata (times of last change,[2] access, modification), as well as owner and permission data.[3] from inode wiki
inode数据结构用于描述文件系统中的文件、目录等, 每一个inode保存了文件系统系统对象memdata如修改时间,访问时间以及权限等。Dennis Ritchie对于inode中i可能代表index,而被访问的文件列表,被组织为存放存放在磁盘上的一维数组。
block ext4文件系统以block为单位分配存储空间。
环境准备 Linux Distributions: CentOS 7
通过fdisk划出一个10M分区, 格式化为ext4
1 2 3 4 5 6 7 8 9 $ fdisk /dev/sdb ... # Start End Size Type Name 1 2048 8390655 4G Linux filesyste 2 8390656 8411135 10M Linux filesyste [root@centosgpt ~]# $ mkfs.ext4 /dev/sdb2 $ mount /dev/sdb2 /root/inode ext4布局 Group 0 Padding ext4 Super Block Group Descriptors Reserved GDT Blocks Data Block Bitmap inode Bitmap inode Table Data Blocks 1024 bytes 1 block many blocks many blocks 1 block 1 block many blocks many more blocks 由于支持Flexible且 Flex block group size:16, 下面通过dumpe2fs输出的信息可以看到 Data Block Bitmap和inode Bitmap 多扩展到了16个block长(实际使用了其中的2个)
...