A can be created using the MKFS command. The common option for-t specifies the file system type to create. Like Ext2,ext3.
"The biggest difference between ext2 vs ext3 is that ext3 is a log-based file system. 】 [Email protected] ~]# mkfs-t EXT2/DEV/SDB1 MKE2FS 1.39 (29-may-2006) Filesystem label= OS Type:linux Block size=1024 (log=0) Fragment size=1024 (log=0) 14056 inodes, 56196 blocks 2809 Blocks (5.00%) reserved for the Super user First Data block=1 Maximum filesystem blocks=57671680 7 Block groups 8192 blocks per group, 8192 fragments per group Inodes per group Superblock backups stored on blocks: 8193, 24577, 40961
Writing Inode Tables:done Writing superblocks and filesystem accounting Information:done
This filesystem'll be automatically checked every mounts or Whichever comes first. Use Tune2fs-c or-i to override.
Read the above information:
Filesystem label refers to the volume label, said the straightforward point, that is, to give/dev/sdb1 an alias, convenient memory and reference.
Block size Specifies the block sizes, which are 1024 bytes, or 1 K.
The number of inode and block, from the above can be seen from the approximate ratio of INODE/BLOCK=1/4, that is, each 4 blocks to specify an inode, that is, 4K blocks corresponding to an inode.
XXX reserved ... Indicates how much space is reserved for the administrator. This ratio can be adjusted in subsequent adjustments.
Block groups, blocks, inodes, superblock these concepts have been involved in my previous blog, here are just a few simple reviews:
On disk, there is a block groups, which is for the purpose of convenient Disk Management division of the logical structure. In block group there are Superblock "super block, need to back up, mainly group related information", inodes "inode table/bit map", blocks "data".
[Email protected] ~]# mkfs-t EXT3/DEV/SDB2 MKE2FS 1.39 (29-may-2006) Filesystem label= OS Type:linux Block size=1024 (log=0) Fragment size=1024 (log=0) 16128 inodes, 64260 blocks 3213 blocks (5.00%) reserved for the Super user First Data block=1 Maximum filesystem blocks=66060288 8 block groups 8192 blocks per group, 8192 fragments per group Inodes per group Superblock backups stored on blocks: 8193, 24577, 40961, 57345
Writing Inode Tables:done Creating Journal (4096 blocks): Done Writing superblocks and filesystem accounting Information:done The red information above indicates that EXT3 is a journal file system.
B about MKFS.EXT2 Mkfs.ext3 etc. [Email protected] ~]# ls-l/sbin/mkfs*-rwxr-xr-x 1 root root 7092 June 2007/sbin/mkfs-rwxr-xr-x 1 root root 18100 J Un 2007/sbin/mkfs.cramfs-rwxr-xr-x 3 root root 47288 June 2007/sbin/mkfs.ext2-rwxr-xr-x 3 root root 47288 June 25 2007/sbin/mkfs.ext3-rwxr-xr-x 3 root root 29672 Jan 2007/sbin/mkfs.msdos-rwxr-xr-x 3 root root 29672 Jan 11 2007/ Sbin/mkfs.vfat
According to which mkfs the above analysis, in fact, there are: Mkfs.ext2 equal mkfs-t ext2 ... Mkfs.ext3 equal mkfs-t ext3 ...
[Email protected] ~]# MKFS.EXT2/DEV/SDB3 ..... [Email protected] ~]# MKFS.EXT3/DEV/SDB5 .....
C Linux provides special command MKE2FS for the Ext type file system, it supports many options, convenient and flexible! Note that without mke3fs this command, the ext3 type of file system can be created for MKE2FS directly using the option-J.
[Email protected] ~]# MKE2FS/DEV/SDB6 [Email protected] ~]# mke2fs-j/DEV/SDB7 Common options:
-j -L Specify Volume label -B Specify block size
-I specify Inode/block ratio -N directly specify the number of Inode -M Specify reserve ratio -e Specifies some additional options to be added later.
-F Force creation. |