实例:
[root@bash ~]# mke2fs -t ext4 -b 4096 -L 'young'\ -i 4096 -N 100000 -I 128 -m 6 -O has_journal /dev/sdb mke2fs 1.42.9 (28-Dec-2013) /dev/sdb is entire device, not just one partition! Proceed anyway? (y,n) y Filesystem label=young OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 102400 inodes, 5242880 blocks 314572 blocks (6.00%) reserved for the super user ...4.e2lablel命令
e2lablel命令用于卷标查看及管理。
格式:
e2label DEVICE [LABEL]实例:
[root@bash ~]# e2label /dev/sdb young [root@bash ~]# e2label /dev/sdb "GEEK" [root@bash ~]# e2label /dev/sdb GEEK5.blkid命令
blkid命令用于块设备属性信息显示。
格式:
blkid [OPTIONS] [DEVICE]常用选项:
-U UUID: 列出某UUID对应的设备 -L LABEL: 列出使用此LABEL设备实例:
[root@bash ~]# blkid /dev/sdb: LABEL="GEEK" UUID="2e564b3f-e542-4bef-aa88-d70935c5c5fb" TYPE="ext4" /dev/sr0: UUID="2015-12-09-22-36-30-00" LABEL="CentOS 7 x86_64" TYPE="iso9660" PTTYPE="dos" /dev/sda1: UUID="812a29ec-11dd-4fa6-b373-c4b42fb80162" TYPE="xfs" /dev/sda2: UUID="3b67c557-763b-41f2-aff0-4810b0324128" TYPE="xfs" /dev/sda3: UUID="86e06c71-0806-4463-bf6d-490a28cb12b6" TYPE="xfs" /dev/sda5: UUID="431c5b57-a52d-4fcc-8845-f984c463b78f" TYPE="swap" [root@bash ~]# ^C [root@bash ~]# blkid -U 2e564b3f-e542-4bef-aa88-d70935c5c5fb /dev/sdb [root@bash ~]# blkid /dev/sdb /dev/sdb: LABEL="GEEK" UUID="2e564b3f-e542-4bef-aa88-d70935c5c5fb" TYPE="ext4" [root@bash ~]# blkid -L "GEEK" /dev/sdb6.dumpe2fs命令
dumpe2fs用于ext系列文件系统的超级块信息查看。
格式:
dumpe2fs [OPTIONS] DEVICE常用选项:
-h: 仅显示超级块信息实例:
[root@CentOS6 ~]# dumpe2fs /dev/sda1 dumpe2fs 1.41.12 (17-May-2010) Filesystem volume name: <none> Last mounted on: /boot Filesystem UUID: 23048871-a3fd-4d25-92da-5c39459bf7c6 Filesystem magic number: 0xEF53 Filesystem revision #: 1 (dynamic) Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super 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: 51200 Block count: 204800 Reserved block count: 10240 Free blocks: 64456 Free inodes: 49329 First block: 1 Block size: 1024 Fragment size: 1024 Reserved GDT blocks: 256 Blocks per group: 8192 Fragments per group: 8192 Inodes per group: 2048 Inode blocks per group: 256 Flex block group size: 16 Filesystem created: Tue Jul 19 19:11:41 2016 Last mount time: Tue Jan 31 02:35:52 2017 Last write time: Tue Jan 31 02:35:52 2017 Mount count: 143 Maximum mount count: -1 Last checked: Tue Jul 19 19:11:41 2016 Check interval: 0 (<none>) Lifetime writes: 332 MB Reserved blocks uid: 0 (user root) Reserved blocks gid: 0 (group root) First inode: 11 Inode size: 128 Journal inode: 8 Default directory hash: half_md4 Directory Hash Seed: ac8bb143-702c-4f17-80fd-afda06b8763e Journal backup: inode blocks Journal features: journal_incompat_revoke Journal size: 4096k Journal length: 4096 Journal sequence: 0x000002a7 Journal start: 1 Group 0: (Blocks 1-8192) [ITABLE_ZEROED] Checksum 0x70bd, unused inodes 214 Primary superblock at 1, Group descriptors at 2-2 Reserved GDT blocks at 3-258 Block bitmap at 259 (+258), Inode bitmap at 275 (+274) Inode table at 291-546 (+290) 3545 free blocks, 216 free inodes, 229 directories, 214 unused inodes Free blocks: 4648-8192 Free inodes: 34, 1834-2048 ...innode与超级块关系图: