Learn about Linux with the birds-from disk partitions to file systems

Source: Internet
Author: User

First of all to see the hard disk's most direct appearance, as shown, this presumably everyone has seen. Its structure is: disc, mechanical arm, head, spindle motor.


The data is written on the platter and the structure of the platter is as follows:


Its internal structure, for the sector, cylinder. Where the first sector of the disk is a special sector, where two important information is logged: the primary boot partition (MBR), which is the address where the boot loader can be installed. Partition table, partition state information for the entire disk. Simply look as shown;


Where the number represents the cylinder. In the figure p1~p4 the main partition or extended partition, we imagine that the whole disk space is a venue, then the MBR is a sign to tell us where the Hall gate, help us enter the venue, partition table is how the whole division of the venue. In order to facilitate the management of the venue, we stipulate that the venue area is divided into three partitions: main partition, extended partition and logical partition. Extended partition is to facilitate the expansion of the partition when necessary for us to use, the entire venue will have only one extended partition, the primary and extended partitions up to 4, the partition extended through the extended partition is the logical partition. Of course, the partition extended by the extended partition also needs to have a table to record the entire extended partition of the site distribution, as is the case.


Our Windows disk is generally divided into C, D, E, F disk, in fact, you can also make any other than a, B, other letters, but note that you can also put a certain disk (such as the F-disk) on a certain disk (such as the C-disk) of a directory (c:/f disk) down, and later access to the c:/f disk is Otherwise, if the letter is not enough to do. In Linux, all the partitions are placed in/this partition.


For the partition to understand the below to understand the Linux file system, first put down a picture to give you an intuitive feeling.

One of the boot sector (boot Sector) It is in the guide reprint of the program, the system needs to boot from here to enter. In order to manage such a large space, it is divided into groups, just as our school will be divided into colleges. Each group has: 1, the Data block, where the surface is divided into a lot of small pieces, many of the files are placed in these small pieces, we call these small pieces for the block,2, Inode table, which is in the information is to indicate those files placed in those blocks. 3, the inode corresponding table, the information in this is indicated, Inode table and those space is not used. 4, block correspondence table, and inode corresponding table similar, but it is for the data block. 5. File system description, used to indicate the space address of the group on disk. 6, super block, which is for the Inode table and data block, indicating the amount of space utilized information. This will clear the way the file is stored, how the file is stored on disk, but since the inode space is only 128bytes, then the size of the indicated file is very limited, how do we store a large file?! Below, familiarize yourself with the structure of the Inode table, as shown in.


Presumably everyone saw the picture to understand the almost, contact C language pointer to see everyone more understand, in fact, is a multi-level pointer relationship; Direct block directly points to the file, the indirect block points to the next level of pointers, and then to the file, and so on, and so on to increase the size of the file is multiplied.

This brings everyone from the disk structure to the file system for some understanding, I hope you can gain from it, at least to understand the relationship between the partition, this is our system structure of a basic knowledge, but also hope that the great God to teach!!

Learn about Linux with the birds-from disk partitions to file systems

Related Article

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.