[ext4]06 磁盘布局 - 特殊inode

Ext4预留了一些inode做特殊特性使用,见下表:

inode

Purpose

0

不存在,Ext4中不存在inode 0.

1

存放损坏的数据块链表

2

根目录

3

User quota. 用户quota索引

4

Group quota. 组quota索引

5

Boot loader.

6

Undelete directory. 未删除的目录

7

预留的块组描述符inode. (用于调整inode数目)

8

日志inode索引

9

The "exclude" inode, for snapshots(?)

10

Replica inode, used for some non-upstream feature?

11

第一个非预留的inode,通常是lost+found目录,s_first_ino in the superblock.

 

root@ubuntu:/mnt/ext4# hexdump -C -s 1445888 -n 256/dev/sdc

/* (Inode 1, 存放损坏的数据链表) */

00161000  0000 00 00 00 00 00 00  e3 9e 2a 53 e3 9e2a 53  |..........*S..*S|

00161010  e39e 2a 53 00 00 00 00  00 00 00 00 00 0000 00  |..*S............|

00161020  0000 00 00 00 00 00 00  00 00 00 00 00 0000 00  |................|

*

00161100

root@ubuntu:/mnt/ext4# hexdump -C -s 1446144 -n 256/dev/sdc

/* (Inode 2, 根目录) */

00161100  ed41 00 00 00 10 00 00  5f 9c 2b 53 47 9c2b 53  |.A......_.+SG.+S|

00161110  479c 2b 53 00 00 00 00  00 00 03 00 08 0000 00  |G.+S............|

00161120  0000 08 00 02 00 00 00  0a f3 01 00 04 0000 00  |................|

00161130  0000 00 00 00 00 00 00  01 00 00 00 61 2100 00  |............a!..|

00161140  0000 00 00 00 00 00 00  00 00 00 00 00 0000 00  |................|

*

00161180  1c00 00 00 58 2e b0 1f  58 2e b0 1f 80 3117 bc  |....X...X....1..|

00161190  e39e 2a 53 00 00 00 00  00 00 00 00 00 0000 00  |..*S............|

001611a0  0000 00 00 00 00 00 00  00 00 00 00 00 0000 00  |................|

*

00161200

root@ubuntu:/mnt/ext4# hexdump -C -s 1446400 -n 256/dev/sdc

/* (Inode 3, user quota) */

00161200  0000 00 00 00 00 00 00  00 00 00 00 00 0000 00  |................|

*

00161300

root@ubuntu:/mnt/ext4# hexdump -C -s 1446656 -n 256/dev/sdc

/* (Inode 4,group quota) */

00161300  0000 00 00 00 00 00 00  00 00 00 00 00 0000 00  |................|

*

00161400

root@ubuntu:/mnt/ext4# hexdump -C -s 1446912 -n 256/dev/sdc

/* (Inode 5,Boot Loader) */

00161400  0000 00 00 00 00 00 00  00 00 00 00 00 0000 00  |................|

*

00161500

root@ubuntu:/mnt/ext4# hexdump -C -s 1447168 -n 256/dev/sdc

/* (Inode 6, 未删除的目录) */

00161500  0000 00 00 00 00 00 00  00 00 00 00 00 0000 00  |................|

*

00161600

root@ubuntu:/mnt/ext4# hexdump -C -s 1447424 -n 256/dev/sdc

/* (Inode 7,预留的用于存放块组描述符的的inode) */

00161600  8081 00 00 00 c0 40 00  e3 9e 2a 53 e3 9e2a 53  |......@...*S..*S|

00161610  e39e 2a 53 00 00 00 00  00 00 01 00 c8 4f00 00  |..*S.........O..|

00161620  0000 00 00 00 00 00 00  00 00 00 00 00 0000 00  |................|

*

00161650  0000 00 00 00 00 00 00  00 00 00 00 66 2100 00  |............f!..|

00161660  0000 00 00 00 00 00 00  00 00 00 00 01 0000 00  |................|

00161670  0000 00 00 00 00 00 00  00 00 00 00 00 0000 00  |................|

00161680  1c00 00 00 00 00 00 00  00 00 00 00 00 0000 00  |................|

00161690  e39e 2a 53 00 00 00 00  00 00 00 00 00 0000 00  |..*S............|

001616a0  0000 00 00 00 00 00 00  00 00 00 00 00 0000 00  |................|

*

00161700

root@ubuntu:/mnt/ext4# hexdump -C -s 1447680 -n 256/dev/sdc

/* (Inode 8,日志索引) */

00161700  8081 00 00 00 00 00 08  e4 9e 2a 53 e4 9e2a 53  |..........*S..*S|

00161710  e49e 2a 53 00 00 00 00  00 00 01 00 00 0004 00  |..*S............|

00161720  0000 08 00 00 00 00 00  0a f3 02 00 04 0000 00  |................|

00161730  0000 00 00 00 00 00 00  ff 7f 00 00 00 8008 00  |................|

00161740  ff7f 00 00 01 00 00 00  ff ff 08 00 00 0000 00  |................|

00161750  0000 00 00 00 00 00 00  00 00 00 00 00 0000 00  |................|

*

00161780  1c00 00 00 00 00 00 00  00 00 00 00 00 0000 00  |................|

00161790  e49e 2a 53 00 00 00 00  00 00 00 00 00 0000 00  |..*S............|

001617a0  0000 00 00 00 00 00 00  00 00 00 00 00 0000 00  |................|

*

00161800

root@ubuntu:/mnt/ext4# hexdump -C -s 1447936 -n 256/dev/sdc

/* (Inode 9) */

00161800  0000 00 00 00 00 00 00  00 00 00 00 00 0000 00  |................|

*

00161900

root@ubuntu:/mnt/ext4# hexdump -C -s 1448192 -n 256/dev/sdc

/* (Inode 10) */

00161900  0000 00 00 00 00 00 00  00 00 00 00 00 0000 00  |................|

*

00161a00

root@ubuntu:/mnt/ext4# hexdump -C -s 1448448 -n 256/dev/sdc

/* (Inode 11,第一个非预留的inode,通常是lost+found,s_first_ino in the superblock) */

00161a00  c041 00 00 00 40 00 00  e3 9e 2a 53 e3 9e2a 53  |.A...@....*S..*S|

00161a10  e39e 2a 53 00 00 00 00  00 00 02 00 20 0000 00  |..*S........ ...|

00161a20  0000 08 00 00 00 00 00  0a f3 01 00 04 0000 00  |................|

00161a30  0000 00 00 00 00 00 00  04 00 00 00 62 2100 00  |............b!..|

00161a40  0000 00 00 00 00 00 00  00 00 00 00 00 0000 00  |................|

*

00161a80  1c00 00 00 00 00 00 00  00 00 00 00 00 00 0000  |................|

00161a90  e39e 2a 53 00 00 00 00  00 00 00 00 00 0000 00  |..*S............|

00161aa0  0000 00 00 00 00 00 00  00 00 00 00 00 0000 00  |................|

*

00161b00

root@ubuntu:/mnt/ext4# 

你可能感兴趣的:(ext4,磁盘布局)