Introduction to the Linux file system

  
                

The Linux file system is a more complicated system, because files in the Linux system are everything, so how complicated the Linux system is and how complicated the Linux file system is. This article will explain a few key points of the Linux file system.

First, the physical disk to the file system

We know that the final document is saved on the hard disk. The most basic component of a hard disk is a disk coated with a magnetic medium made of a hard metal material. The number of disks of different capacity hard disks varies. Each disc has two sides and can record information. The disc is divided into a number of sector-shaped areas, each of which is called a sector, and each sector can store 128× 2 N-th power (N = 0.1.2.3) bytes of information. In DOS, each sector is 128× 2 is the second power = 512 bytes, the disc surface is centered on the disc center, and concentric circles of different radii are called tracks. In a hard disk, a cylinder composed of tracks of the same radius of different disks is called a cylinder. Both the track and the cylinder are circles with different radii. In many cases, the track and the cylinder can be used interchangeably. We know that each disk has two faces, each face has a head, which is accustomed to distinguish by the head number. . The sector, track (or cylinder) and number of heads constitute the basic parameters of the hard disk structure. The parameters of the hard disk can be obtained by these parameters. The calculation formula is:

storage capacity = number of heads & times; track (column Number) & times; number of sectors per time & bytes per sector

POINT:

(1) The hard disk has several platters, two faces per platter, each One magnetic head

(2) The disc is divided into a plurality of sector-shaped areas, that is, sectors

(3) Concentric circles of different radii of the same disc are tracks

( 4) Cylindrical surface composed of the same radius of different discs, ie cylinder

(5) Formula: Storage capacity = number of heads & times; number of tracks (cylinders) & times; number of sectors per time & times; Bytes

(6) The information record can be expressed as: ×× track (cylinder), ×× head, ×× sector

then these spaces How is it managed? Unix/linux uses a simple method. as the picture shows.

It divides the disk block into the following three parts:

1) The super block, the first block in the file system is called the super block. This block stores the structure information of the file system itself. For example, the super block records the size of each area, and the super block also stores information about unused disk blocks.

2) I-cut point table. The next part of the superblock is the i-node table. Each i-node is a structure corresponding to a file/directory. This structure contains information such as the length of a file, the creation and modification time, permissions, ownership, and location on the disk. A file system maintains an array of inodes, each of which corresponds to a unique element in the array of inodes. The system assigns each index node a number, which is the index number of the node in the array, called the inode number

3) data area. The third part of the file system is the data area. The contents of the file are saved in this area. All blocks on the disk are the same size. If the file contains more than one block of content, the contents of the file are stored in multiple disk blocks. A large file can easily be distributed across thousands of unique disk blocks. Previous1234Next page Total 4 pages

Copyright © Windows knowledge All Rights Reserved