Linux Foundation compaction of the principle of disk partitioning knowledge

Source: Internet
Author: User

Disk partitioning uses the partition editor (partition editor) to divide several logical parts on disk. Once the disc is divided into several partitions (partition), the non-homogeneous directory files can be stored in different partitions.
At the earliest, the partition has only one partition: The primary partition, the primary partition can only have a maximum of 4 (determined by the structure of the hard disk, divided into 4 equal-size sectors, each 512 bytes, 446 bytes record boot information, 64 bytes for the partition representation (each 16 bytes represents a partition, can represent 4 partitions), and two bytes left (a) is a partition end flag, and later joins an extended partition (an extended partition that takes 1/4 of the partition out of it), leaving 3 primary partitions (up to 4 primary partitions plus extended partitions), and an extended partition of up to 1 disks, the extended partition cannot write data and can only contain logical partitions! (Remember a few partition types: Primary partition, extended partition, logical partition)

At this point we need to review the format, format, also known as logical format, it is based on the user selected file system (such as FAT32.NTFS, EXT234, etc.), in a specific area of the disk to write specific data, in the partition for the file allocation table, directory table, etc. for file management disk space.
① format, the system in a partition divides the space into equal, such as n 4KB small lattice (block, the default 4KB), if you want to save 10K of things, save to 3 lattice, the third lattice left 2K will no longer save things:

② and then formatting also do one thing is to establish a lookup rule (partition list, that is, the record of a file in which lattice, good to restore files, record the ID number, modification time, permissions, etc.), the Linux record file is placed in which the number of lattice ID howl I node Formatting is also a re-planning block size, file list of data blocks.

After formatting, is the allocation of the letter, win system directly C, D, E, F ... Alphabetical assignment, and Linux is a file name for the drive letter (everything in Linux files, hard disk, mouse, even users, etc.), and then assign the drive letter! is the name of a Linux system that is not a device:

Since it is a file, there is a saved location in/to the root directory (the highest level directory), and Dev saves the file name of the hardware device.


Partitions 1, 2, 3, 4th can only be used for primary or extended partitions, the logical partition must be starting from 5!

The next step is to give the drive letter! In Linux, called Mount
The drive letter in win is called the mount point in Linux, but instead of ABC as the ' drive letter ', it takes ' directory ' as ' drive letter ' (Mount point)

Attention
①swap partition is called swap partition, is actually virtual memory (really memory is not enough when the swap space to use)
② the root partition/and swap partition is required! The root partition/is the highest level to hold all the data, if you do not allocate space, things can not be saved

③boot partition is the boot partition, if not, the boot data will be placed in the/root partition, once the root partition is full, the system will not start, so the boot partition, even if/partition full, boot still have space, you can start!

Linux Foundation compaction of the principle of disk partitioning knowledge

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.