#查看分區卷標 [root@localhost ~]# e2label /dev/sdb1 mytest #修改分區卷標 [root@localhost ~]# e2label /dev/sdb1 'labelNew' [root@localhost ~]# 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查看詳細的參數 示例:
[root@localhost ~]# 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 (<none>) 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 [root@localhost ~]# tune2fs -o journal_data /dev/sdb1 tune2fs 1.42.9 (28-Dec-2013) [root@localhost ~]# tune2fs -l /dev/sdb1 .... Default mount options: journal_data user_xattr acl ....dumpe2fs 命令:顯示 ext2/ext3/ext4 文件系統信息 語法:dumpe2fs [option] DEVICE 參數: -h: 僅顯示超級塊信息; -b:顯示壞塊信息 -x:顯示詳細的組信息 示例:
[root@localhost ~]# 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 ...組信息...