文件系统属性查看及调整工具:
e2label命令:设置文件系统卷标,这样避免格式化修改卷标
e2label 设备名称 [Label]#查看分区卷标
[[email protected] ~]# e2label /dev/sdb1
mytest
#修改分区卷标
[[email protected] ~]# e2label /dev/sdb1 ‘labelNew‘
[[email protected] ~]# e2label /dev/sdb1
labelNew
tune2fs命令:显示ext系列文件系统的属性或修改其属性
语法:tune2fs [option] 设备名称
参数:
-l:显示super block中的信息
-j:将ext2文件系统转换为ext3文件系统,加入journal
-L ‘label’:类似e2label,分区卷标
-m #:调整预留给管理员的管理空间百分比
-O:文件系统属性的启动或关闭
[^]feature[,...]
-o:文件系统默认挂载选项的启用或关闭
[^]mount-option[,...]
man tune2fs查看详细的参数
示例:[[email protected] ~]# tune2fs -l /dev/sdb1
tune2fs 1.42.9 (28-Dec-2013)
Filesystem volume name: labelNew ------->卷标
Last mounted on: /mnt/test3 ----->挂载点
Filesystem UUID: e238f3ae-863c-473e-a1ca-35b1e0a69de2
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent 64bit flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
Filesystem flags: signed_directory_hash
Default mount options: user_xattr acl ----> 默认挂载选项
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 65536
Block count: 262144
Reserved block count: 13107
Free blocks: 249189
Free inodes: 65524
First block: 0
Block size: 4096
Fragment size: 4096
Group descriptor size: 64
Reserved GDT blocks: 127
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 8192
Inode blocks per group: 512
Flex block group size: 16
Filesystem created: Tue Sep 15 05:53:15 2015
Last mount time: Tue Sep 15 17:07:02 2015
Last write time: Tue Sep 15 17:59:21 2015
Mount count: 9
Maximum mount count: -1
Last checked: Tue Sep 15 05:53:15 2015
Check interval: 0 ()
Lifetime writes: 49 MB
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 256
Required extra isize: 28
Desired extra isize: 28
Journal inode: 8
Default directory hash: half_md4
Directory Hash Seed: 45da449e-ad33-4a49-9660-1469a94cc2f8
Journal backup: inode blocks
#修改默认挂载选项:启用journal_data
[[email protected] ~]# tune2fs -o journal_data /dev/sdb1
tune2fs 1.42.9 (28-Dec-2013)
[[email protected] ~]# tune2fs -l /dev/sdb1
....
Default mount options: journal_data user_xattr acl
....
dumpe2fs 命令:显示 ext2/ext3/ext4 文件系统信息
语法:dumpe2fs [option] DEVICE
参数:
-h: 仅显示超级块信息;
-b:显示坏块信息
-x:显示详细的组信息
示例:[[email protected] ~]# dumpe2fs -x /dev/sdb1
dumpe2fs 1.42.9 (28-Dec-2013)
Filesystem volume name: labelNew
...super block 信息...
Journal start: 0
Group 0: (Blocks 0x00000000-0x00007fff) [ITABLE_ZEROED]
Checksum 0xba41, unused inodes 8180
Primary superblock at 0x00000000, Group descriptors at 0x00000001-0x00000001
Reserved GDT blocks at 0x00000002-0x00000080
Block bitmap at 0x00000081 (+129), Inode bitmap at 0x00000091 (+145)
Inode table at 0x000000a1-0x000002a0 (+161)
28521 free blocks, 8180 free inodes, 2 directories, 8180 unused inodes
Free blocks: 0x0000008e-0x00000090, 0x00000099-0x000000a0, 0x000010a2-0x00007fff
Free inodes: 0x0000000d-0x00002000
...组信息...
如有错误,敬请指正!
谢谢!
原文:http://rogerwang.blog.51cto.com/5326353/1695069