现在的位置: 首页 > 综合 > 正文

tune2fs和dumpe2fs 命令用法

2013年12月04日 ⁄ 综合 ⁄ 共 1436字 ⁄ 字号 评论关闭

tune2fs是linux下面重要的文件系统调整工具,其中的几个选项解释如下:

-c:表示文件系统在mount次数达到设定后,需要运行fsck检查文件系统。
-i:文件系统的检查间隔时间。系统在达到时间间隔时,自动检查文件系统。
-l:显示文件系统的很多参数。
-j:转换为ext3文件系统。
-m: Set the percentage of reserved filesystem blocks。 设置保留的空间百分比
-o: Set or clear the indicated default mount options in the filesystem.设置默认加载参数

通常如果使用ext3文件系统的话,使用-c 0关掉mount次数达到后的文件系统检查。

tune2fs -m 10 /dev/sda1
tune2fs -o acl,user_xattr /dev/sda1
tune2fs -i 0 -c0 /dev/sda1

显示当前的磁盘状态(dumpe2fs)

[root@tonykorn97 /]# dumpe2fs /dev/sda1
dumpe2fs 1.35 (28-Feb-2004)
Filesystem volume name: /boot
Last mounted on: <not available>
Filesystem UUID: 5bd40e99-41d8-4ec8-919f-2b2a11ef5435
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery sparse_super
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 26000
Block count: 103980
Reserved block count: 5199
Free blocks: 91961
Free inodes: 25966
First block: 1
Block size: 1024
Fragment size: 1024
Reserved GDT blocks: 256
Blocks per group: 8192
Fragments per group: 8192
Inodes per group: 2000
Inode blocks per group: 250
Filesystem created: Tue Apr 1 22:19:51 2008
Last mount time: Tue Apr 1 14:49:10 2008
Last write time: Tue Apr 1 14:49:10 2008
Mount count: 2
Maximum mount count: -1
Last checked: Tue Apr 1 22:19:51 2008
Check interval: 0 (<none>)
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 128
Journal inode: 8
Default directory hash: tea
Directory Hash Seed: b48bee98-d59c-4c25-9d0b-50d5f5296152
Journal backup: inode blocks

抱歉!评论已关闭.