First, the meaning of disk partitioning
Disk partitioning is to divide the disk into different logical regions, each of which can have different file systems
Two
The disk partition is partitioned according to the disk's cylinder, because the disc rotates at the same angular speed, so the head on the outermost track to read information the fastest, when reading a large amount of data, the partition containing the outermost track is the fastest read speed.
III. structure of the ext2 file system
Is the structure of the entire partition:
Block
For ext2 (ext3-like) file systems, the hard disk partition is first divided into blocks, and each block size on the same ext2 file system is the same. However, for different ext2 file systems, the size of the block can vary. The typical block size is 1024x768 bytes or 4096 bytes. This size is determined when the Ext2 file system is created, it can be specified by the system administrator, or the file system creator can automatically select a more reasonable value based on the size of the hard disk partition.
The block count on a hard disk partition starts at 0, and the count is global for this hard disk partition.
Bootblock
Bootblock is stored in the Bootloader program that corresponds to the operating system of this file system
Blockgroup
All blocks in the hard disk partition are grouped together into several large block groups, with each block group having a fixed number.
Group Descriptor Table (GBT)
Each block group corresponds to a Group descriptor table, and these Group descriptor table are gathered together at the beginning of the hard disk partition, followed by the Super block. There are several important block pointers in each group descriptor that point to the Inode table, block bitmap, and Inode bitmap of the block group.
Inode number
Inode number is automatically generated when a partition is formatted as a ext2 or ext3 file system.
The inode number determines how many files or directories are stored in this partition, because each file and directory has inode numbers corresponding to it.
Inode table
Each inode number has a corresponding inode table.
The Inode table records the metadata (metadata) corresponding to the inode number corresponding to the file.
The main function of metadata is to describe the properties of the data:
"pointer", which records the number of blocks the file occupies.
When you store a file, the Linux system will find the inode number corresponding to the file. The corresponding Inode table is then read according to the inode number of the file. The "pointer" in the Inode table lets you know which blocks the file is stored in to store the file.
Block Bitmap inode Bitmap
Both indicate whether the area corresponding to the bitmap is free.
Linux Disk Management