作法:找出ext2/ext3档案系统的inode大小
时间:2020-01-09 10:41:58 来源:igfitidea点击:
问题描述:
如何找出ext3文件系统的inode大小以进行恢复。
如何找到ext2/ext3文件系统的inode大小?
解决方法:您需要使用tune2fs命令,该命令允许系统管理员在Linux ext2/ext3文件系统上调整各种可调文件系统参数。
查找文件系统的索引节点大小
-l选项列出文件系统的索引节点大小。
使用相同的选项,也可以看到文件系统超级块的其他信息。
超级块包含有关文件系统的信息,例如可用的可用块数和安装数,这些信息可能对调整有用。
# sudo tune2fs -l /dev/sda2
输出:
tune2fs 1.40.2 (12-Jul-2007) Filesystem volume name: Last mounted on: Filesystem UUID: 8c2da865-13f4-47a2-9c92-2f31738469e8 Filesystem magic number: 0xEF53 Filesystem revision #: 1 (dynamic) Filesystem features: has_journal resize_inode dir_index filetype needs_recovery sparse_super large_file Filesystem flags: signed directory hash Default mount options: (none) Filesystem state: clean Errors behavior: Continue Filesystem OS type: Linux Inode count: 12222464 Block count: 24412775 Reserved block count: 1220638 Free blocks: 17464715 Free inodes: 12055081 First block: 0 Block size: 4096 Fragment size: 4096 Reserved GDT blocks: 1018 Blocks per group: 32768 Fragments per group: 32768 Inodes per group: 16384 Inode blocks per group: 512 Filesystem created: Sat Oct 6 04:51:23 2007 Last mount time: Fri Nov 9 08:07:04 2007 Last write time: Fri Nov 9 08:07:04 2007 Mount count: 12 Maximum mount count: 32 Last checked: Mon Nov 5 13:33:36 2007 Check interval: 15552000 (6 months) Next check after: Sat May 3 13:33:36 2008 Reserved blocks uid: 0 (user root) Reserved blocks gid: 0 (group root) First inode: 11 Inode size: 128 Journal inode: 8 First orphan inode: 1163400 Default directory hash: tea Directory Hash Seed: bcaf359b-11c2-4c1a-8823-92be72c09ac4 Journal backup: inode blocks
要查找索引节点大小,请执行:
# sudo tune2fs -l /dev/sda2 | grep Inode
输出:
Inode count: 12222464 Inodes per group: 16384 Inode blocks per group: 512 Inode size: 128