Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Detailed explanation of linux file system

2025-02-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Main structure:

The relationship between disk composition and partition file system characteristics EXT2 file system and directory tree EXT2/ext3 file system access and journal file system function linux file system run mount point meaning of other linux supported file system and vfsxfs file system introduction

1. The composition of the whole disk

The circular disc (the part in which Zhu Yasong records the data) the mechanical arm, and the spindle motor on the magnetic head on the mechanical arm (which can read and write the data on the disc), can rotate the disc and allow the head of the mechanical arm to read and write data on the disc.

two。 The physical sector on the disk is the smallest physical storage unit, and according to the different design of the disk, there are mainly two formats: 512Bytes and 4K. The sector is formed into a circle, and that is the cylinder. There are two main formats of disk partition tables, one is the MBR partition table with more restrictions, and the other is the newer and less restricted GPT partition table. In the MBR partition table, the first sector is the most important, which includes: (1) the main boot area (master boot record,MBR) and partition table (partition table), in which MBR occupies 446Bytes and partition table occupies 64Bytes. In addition to expanding the number of partitions, the GPT partition table can also support more disk capacity than 2TB.

3. Physical disk and virtual disk

4. The meaning of the three data superblock: record the overall information of this filesystem, the total amount of package inode/block, usage, surplus, as well as the format of the file system and related information. Inode: records the attributes of a file. A file occupies an inode and records the block number where the file's data is located. Block: actually record the contents of the file. If the file is too large, it will take up multiple block.

5. Six main contents of Block Group (block group)

1) data block (data block)

What are the restrictions on block for ext2 file systems? In principle, the size and number of block cannot be changed when formatted (unless reformatted). Data from at most one file can be placed in each block. If the file is larger than the size of the block, one file will take up more than one block. If the file is smaller than block, the remaining capacity of the block can no longer be used (disk space will be wasted).

2) inode table (inode form)

File data recorded by inode: the access mode of the file the owner of the file is grouping the capacity of the file the time when the file was created or changed (ctime) the last read time (atime) the last modified time (mtime) defines the flag of the file properties, the direction of the true content of the file.

Inode features that each inode size is fixed to 128Bytes (the new ext4 and xfs can be set to 256Bytes). Each file takes up only one inode. So the number of files that a file system can create is related to the number of inode. When the system reads the file, it needs to find the inode first, and analyze whether the recorded permissions are consistent with the user, and if so, it can actually read the contents of the block.

3) Superblock (Super Block)

The total amount of recorded information block and inode is unused and the number of inode/block used is the size of block and inode (block is 1meme 2je 4K Magi Inode is 128Bytes or 256Bytes). The mount time of the filesystem, the last time the data was written, and the last time to check the hard press of the disk and other file system related information. A valid bit value, valid bit is 0 if the file system is mounted, and valid bit is 1 if it is not mounted.

4) Filesystem Description (File system description) this section describes the block number at the beginning and end of each block group, as well as which block number each segment lies between.

5) block bitmap (Block comparison Table) records the use and non-use of block blocks.

6) inode bitmap (inode comparison Table) inode bitmap is a record of used and unused inode numbers.

6. Relationship with directory tree

7. Behavior of the file system

8. Log file system

Operation of 9.linux file system

10. The meaning of the mount point (mount point) each filesystem has its own inode/block/superblock and other information, and the file system must be able to link to the directory tree before it can be used by us. The act of combining a file system with a directory tree is called a mount.

11. Other file systems supported by linux and VFS

Introduction to 12.XFS file system

In terms of data distribution, the xfs file system is mainly planned into three parts: data zone, file system activity, login area, real-time operation.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report