File system Features: Why do I need to format the partition to use it?
A: Because the file attributes and permissions for each job system lock are not the same, in order to store the data required for these files (so you need to format the file system format that the operating system can use filesystem)
Linux formal file system: EXT2 (Linux Second extended file system, EXT2FS), default Windows is not aware of the EXT2 file systems
A data can be mounted as a file system instead of a split slot (formerly a partition slot can only be formatted as a file system, so we say a filesystem is a partition)
How the file system works:
1> The file system usually stores the two parts of the data in separate chunks, with permissions and attributes placed in the inode, and the actual data is placed in the data block.
2>.superblock Super BLOCK: Records the overall information of the entire file system, including the total number of inode and block, usage, remaining amount, and file system format and related information
3>.inode: Records the properties of a file, a file occupies an inode, and records the number of the block where the file's data resides
4>.block: The actual record of the contents of the file, if the content is too large, the use of more than block
Compare the following two types of file systems:
Disk reorganization: When the file written block is too discrete, when the performance of the file read will become particularly poor, you need to consider "reorganization";
Disk reorganization: The block that the unified archive belongs to can be integrated together, the data reading will be easy
Indexed file system: (because it is an indexed file system, so there is no need to consider the regular disk reorganization, of course, if the file system used too long, often delete/Add/modify files, resulting in too discrete file data, you need to consider restructuring it)
FAT file system: (because the FAT file system its block can not be read once, need to read sequentially, when the unified data block is too discrete, read data will be very slow, need three not five o'clock reorganization)
The file system began with the inode and block planning, unless reformatted, the inode and block will not change after the fixed
Ext2 File System:
Each chunk group six major content description:
Data Block (data block): EXT2 file system supported block size 1k, 2k, 4k three, due to the size of the block different, resulting in the file system can support disk maximum capacity and maximum single file capacity is not the same
Limit:
1.block size and capacity can no longer be modified after formatting (unless reformatted)
2. A maximum of one file can be placed within each block
3. If the file size is larger than the block size, then a file may occupy multiple blocks
4. If the size of the file is smaller than the block size, the remaining capacity of the block can no longer be used (wasted disk space)
Inode table: Its size and number are fixed at the time of formatting.
Logged Information:
Access mode for this file (Read/write/excute)
The owner and group of the file (Owner/group)
The file's capacity
Time of establishment and modification of the file
Last Read time
Last modification time
Flags that define the characteristics of the file, such as suid ...
The real content of the archive points to
Characteristics:
Each inode size is fixed to 128bytes (new Ext4 and XFS can be set to 256bytes)
Each file will only occupy one inode.
The number of file systems that can be established is related to the number of inode
When the system reads the file, it needs to go to the inode first to analyze the permissions within the Inode and whether the user is compliant, and to begin to actually read the contents of the block.
Linux: Disk and file System management