Linux file system

Source: Internet
Author: User

Ext2 as an indexed file system, a file occupies an inode, records the permissions and attributes of the file, and records the block number of the file where the data resides;

The benefits of disk partitioning: with MySQL as the data directory, if you put the data catalog in a separate partition, you can greatly reduce disk fragmentation and improve read and write efficiency.

The Ext2 file system is formatted into multiple block groups, each with a separate inode/block/superblock

Inode Record Information:

Access mode of the file R W X

The owner and group of the file

Size of File

File creation or state change time CTime

Time of last Read actime

Last Modified time Mtime

Flags that define file attributes

Pointing to the real content of the file

Each inode size is fixed to 128bytes each file occupies an inode file system can be created by the number of files associated with the number of inode; When the system reads the file, it first finds the inode and parses the inode to see if the permissions are in accordance with the user, in order to start actually reading B ' Lock content

The Inode record block number area is defined as 12 direct, one indirect, one double indirect, one three indirect: assuming block is 1kB

12k + 256k+ 256*256k+ 256*256*256 = 16GB

In addition to the first block group containing Superblock, subsequent block group does not necessarily contain superblock, a filesystem should contain a superblock, and the other superblock in one filesystem are primarily backup

Blocks bitmap block table records whether block is used; When deleting a file, locate the block number in bitmap and change the block's flag to unused

Linux file system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.