mke2fs 命令的基本格式如下:
[root@localhost ~]# mke2fs [选项] 分区设备文件名
表 1 罗列出了 mke2fs 命令常用的几个选项及各自的功能。为了更好的对比 mkfs 命令,这里我们依旧以格式化 /dev/sdb6 为例,不过,这次使用的是 mke2fs 命令,执行命令如下:
[root@localhost ~]# mke2fs -t ext4 -b 2048 /dev/sdb6
#格式化分区,并指定block的大小为2048 Bytes
mke2fe 1.41.12 (17-May-2010)
Filesystem label=
OS type:Linux
Block size=2048 (log=1) <--block 的大小配置为 2K
Fragment size=2048 (log=1)
Stride=0 blocks, Stripe width=0 blocks 131560
inodes,1052240 blocks 52612 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=538968064 65 block groups
16384 blocks per group, 16384 fragments per group
2024 inodes per group
Superblock backups stored on blocks:
16384, 49152, 81920, 114688, 147456, 409600, 442368, 802816
Writing inode tables: done
Creating journal (32768 blocks):done
Writing superblocks and filesystem accounting information:done
This filesystem will be automatically checked every 38 mounts or 180 days, whichever comes first. Use tune2fs -c or-i to override.