一、查看系统所支持的文件系统,分区格式
[root@localhost ~]# cat /etc/filesystems
ext4
ext3
ext2
nodev proc
nodev devpts
iso9660
vfat
hfs
hfsplus
格式化实例一、把/dev/sdb1格式化为ext4,过程如下
[root@localhost ~]# mkfs.ext4 /dev/sdb1
mke2fs 1.41.12 (17-May-2010)
文件系统标签=
操作系统:Linux
块大小=1024 (log=0)
分块大小=1024 (log=0)
Stride=0 blocks, Stripe width=0 blocks
28112 inodes, 112420 blocks
5621 blocks (5.00%) reserved for the super user
第一个数据块=1
Maximum filesystem blocks=67371008
14 block groups
8192 blocks per group, 8192 fragments per group
2008 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 32 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
格式化实例二、把/dev/sdb1格式化为ext4,指定blocks块大小为2048(这个blocks大小必须是1024的2位或4位),保留空间为1%,标签为CPAN,过程如下:
[root@localhost ~]# mke2fs -t ext4 -b 2048 -m 1 -L CPAN /dev/sdb1
mke2fs 1.41.12 (17-May-2010)
文件系统标签=CPAN
操作系统:Linux
块大小=2048 (log=1)
分块大小=2048 (log=1)
Stride=0 blocks, Stripe width=0 blocks
28160 inodes, 56210 blocks
562 blocks (1.00%) reserved for the super user
第一个数据块=0
Maximum filesystem blocks=57671680
4 block groups
16384 blocks per group, 16384 fragments per group
7040 inodes per group
Superblock backups stored on blocks:
16384, 49152
正在写入inode表: 完成
Creating journal (4096 blocks): 完成
Writing superblocks and filesystem accounting information: 完成
This filesystem will be automatically checked every 35 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.