- [root@btg linux-2.6]# truncate --size 128M fsfile
- [root@btg linux-2.6]# mkfs.ext4 -F fsfile
- mke2fs 1.41.12 (17-May-2010)
- 文件系统标签=
- 操作系统:Linux
- 块大小=1024 (log=0)
- 分块大小=1024 (log=0)
- Stride=0 blocks, Stripe width=0 blocks
- 32768 inodes, 131072 blocks
- 6553 blocks (5.00%) reserved for the super user
- 第一个数据块=1
- Maximum filesystem blocks=67371008
- 16 block groups
- 8192 blocks per group, 8192 fragments per group
- 2048 inodes per group
- Superblock backups stored on blocks:
- 8193, 24577, 40961, 57345, 73729
- 正在写入inode表: 完成
- Creating journal (4096 blocks): 完成
- Writing superblocks and filesystem accounting information: 完成
- This filesystem will be automatically checked every 33 mounts or
- 180 days, whichever comes first. Use tune2fs -c or -i to override.
- [root@btg linux-2.6]#
- [root@btg linux-2.6]# losetup /dev/loop0 fsfile
- [root@btg linux-2.6]# mount /dev/loop0 mnt
- [root@btg linux-2.6]#
- [root@btg linux-2.6]# tune2fs -l /opt/linux-2.6/fsfile
- tune2fs 1.41.12 (17-May-2010)
- Filesystem volume name: <none>
- Last mounted on: <not available>
- Filesystem UUID: 1a1354d1-3a6d-4a32-bff6-6f0460d7173a
- 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: (none)
- Filesystem state: clean
- Errors behavior: Continue
- Filesystem OS type: Linux
- Inode count: 32768
- Block count: 131072
- Reserved block count: 6553
- Free blocks: 121285
- Free inodes: 32757
- 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: Thu Jun 2 15:15:12 2011
- Last mount time: Thu Jun 2 15:15:50 2011
- Last write time: Thu Jun 2 15:15:50 2011
- Mount count: 1
- Maximum mount count: 33
- Last checked: Thu Jun 2 15:15:12 2011
- Check interval: 15552000 (6 months)
- Next check after: Tue Nov 29 15:15:12 2011
- Lifetime writes: 8 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: 1514e018-3be3-4cdf-a60c-602892d9049f
- Journal backup: inode blocks
- [root@btg linux-2.6]#
- [root@btg linux-2.6]# tune2fs -L "HelloEXAMPLE" /opt/linux-2.6/fsfile
- tune2fs 1.41.12 (17-May-2010)
- [root@btg linux-2.6]# tune2fs -l /opt/linux-2.6/fsfile |grep "Filesystem volume name"
- Filesystem volume name: HelloEXAMPLE
- [root@btg linux-2.6]#
上面可以查看/dev/sda1上面的左右的可调参数
-c是设置最大挂载次数
-i是设定两次文件系统检查之间的最长时间间隔
-L设置label
-j 设置has_journal功能标记
-r设置保留块数