The prerequisite for creating a file system is a partition
creating a file system
The system has reserved some storage space for super user for managing operations
Creating Journal is to create a log for the operating system
another way to create a file system
Using-t to perform file system types
If the specified partition already has a file system, you can use-F to force file system creation
using Blkid to view file system brief information
advanced ways to create file systems
Mke2fs
This command is used to create the EXT2/3/4 file system.
-t specifies the file system type EXT2/EXT3/EXT4 default is Ext2
How to create a Ext4 file system: Mkfs.ext4=mkfs-t ext4=mke2fs-t EXT4
-b Specifies that the block size parameter must be a multiple of 1024 by default is 4096 optional value 1024 2048 4096
-c check for bad blocks before creating the file system, if this parameter is only once, use read-only detection. If there are 2 times, read-write mode is used to detect.
-c Specifies the cluster size. The size of each cluster is from 2048 bytes to 256M bytes
-D writes the data directly to the hard disk and does not need to occupy memory. But because it is written directly to the hard disk, the time to create the filesystem system grows.
-L indicates a volume label, similar to an alias
-j creating a file system with logging capabilities Ext3
-I an inode occupies a number of bytes or This parameter is a percentage,
-n Specifies how many inode a file system contains
-I directly specifies the byte space occupied by the Inode
-O [^]feature turn on or off a feature when creating a file system
-m specifies the percentage of space reserved to administrators by default is 5 (5%)
-UUID Specifies the UUID of the file system
now practice .
Create a 1G partition and format it as a EXT4 file system with a block size of 2048 reserved Space 3% volume label MyData
File system formatting of Linux disk partitions