Mechanical hard disk partition structure and data storage principle

1. Primary partition
Primary partition, also known as primary disk partition, is a type of partition like extended partition and logical partition. The primary partition cannot be divided into other types of partitions, so each primary partition is equivalent to a logical disk (the primary partition is similar to the logical partition at this point, but the primary partition is directly divided on the hard disk, and the logical partition must be Established in the extended partition) A hard disk primary partition has at least 1 and at most 4.
The activated primary partition is the boot partition of the hard disk. It is independent and the first partition of the hard disk. If it is divided normally, it is the C drive.
2. Extended partition After the main partition is
separated , the rest can be divided into extended partitions, but extended partitions cannot be used directly. They are used in the form of logical partitions, so extended partitions can be divided into several logical partitions. Their relationship is a containment relationship, and all logical partitions are part of an extended partition.
3. Logical partition A
logical partition is a continuous area on the hard disk. The difference is that each primary partition can only be divided into one drive, and each primary partition has its own independent boot block, which can be set as the boot area with fdisk. A hard disk can have up to 4 primary partitions, and an extended partition can be divided into multiple logical drives. These logical drives do not have a separate boot block and cannot be set as the boot area using fdisk. Both primary and extended partitions are dos partitions.
Data storage principle

1. File reading The
operating system reads file information (including file name, suffix name, file size, modification date and the cluster number of the first cluster saved in the data area) from the directory area, here we Suppose the first cluster number is 0023.
The operating system reads the corresponding data from the 0023 cluster, and then finds the 0023 unit of the FAT. If the content is the file end mark (FF), it means the file is over, otherwise the content saves the cluster number of the next cluster of data, and so on until An end-of-file flag was encountered.
2. File writing
When we want to save the file, the operating system first finds the empty area in the DIR area and writes the corresponding information such as the file name, size and creation time, then finds the free space in the Data area to save the file, and stores the first cluster in the Data area. Write to the DIR area, and the rest of the actions are similar to the read actions above.
3. Deletion of
files is very simple, as simple as making a little change in the directory area - changing the first character of the file in the directory area to E5 means that the changed file will be deleted.
Repair Logical Bad Sectors
When your computer encounters events such as power failure, crash, unexpected restart, or CRC redundancy check error during copying, please use HDtune tool to check (05), (C5), (C6 of SMART parameters immediately ) item to see if there is a value, it should be 0 normally. If only (C5) has a value other than zero and (C6) is 0 and (05) is 0, then there is only a logical bad sector.
The first is for DiskGenius
to use DiskGenius to scan bad sectors and to repair logical bad sectors.
The second tool, low-level formatting such as efficiency sources. Before low-level formatting, the data on the hard disk must be backed up first, which will erase all data on the disk. Generally speaking, if there is no error, the C5 value will be cleared to 0, and the logical bad sectors will be truly repaired.
Repair physical bad sectors
Use PQ Magic
to first scan the hard disk surface with Scandisk or chkdsk/F to find the location of bad sectors (for example, about 10% of the C drive); then use PQ Magic, select "Advanced/badSectorRetest" under the Operations menu, and set the The space where the bad sectors are located (for example, 15% to 20% of the front of the C drive) is divided into a partition, and the partition is hidden, so that the physical bad sectors are in the hidden partition; after the bad sectors are shielded, use Scandisk or chkdsk /F scans the new partition to ensure that all bad sectors are masked to the hidden partition.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326939173&siteId=291194637