Linux Disk Management four--(1) disk structure, understanding partitions

Source: Internet
Author: User

Tag: sector motor helps art loader controller via CTO images

Recently small compilation of disk Management related knowledge, found that there is still a lot of, all of the four parts to share a bit:

1, disk structure, recognize the partition

2, management partition, file system format

3. Mount mount,/etc/fstab configuration file

4, peripheral connection, common tools

This article begins with the most basic disk knowledge-the disk structure, the understanding partition. (the basic will be a bit boring, but the basis is still very important, so I hope you know more about)

First, the type of equipment:

(1) block device: block, Access unit " blocks ", Disk

character device:char , Access unit " character ", keyboard

(2) mechanical hard drives and solid-state drives

Mechanical Hard Drive ( HDD ): That is the traditional ordinary hard disk, mainly by: platters, magnetic head , disc spindle and control motor, head controller, data converter, interface, caching and other parts. All discs in the mechanical hard drive are mounted on a rotating shaft, each disc

is parallel to each disk on the storage surface has a head, the distance between the head and the disk is smaller than the diameter of the head hair, all the heads are connected to a head controller, the head controller is responsible for the movement of each head. The head can move along the radius of the disc, plus the disk rotates at a high speed of thousands of RPM, the head can be positioned at the specified position of the disk for data read and write operations. The data is written to the disk by the magnetic flux through the magnetic head by the electromagnetic flow, or it can be read in the opposite way. The hard drive is a precision device and the air entering the hard drive must be filtered.

Solid-State Drive ( SSD ): A hard disk made ofsolid-state electronic storage chip array , consisting of a control unit and a memory unit (FLASH chip,DRAM Chip). SSD in the interface specification and definition, function and use of the same as the ordinary hard disk,

In the product shape and size is also consistent with the ordinary hard disk.

Comparison:

Compared to HDD ,SSD has a clear advantage in shock-proof, transmission rate, power consumption, weight, noise,SSD transfer rate performance is HDD 2 Times

Compared to SSD ,HDD has the absolute advantage in price, capacity and service life

hard disk price, data priceless, currently SSDs do not completely replace HHD

(3) equipment files

① Device file name for disk device:/dev/dev_file

② Different disk identities:a-z,aa,ab ...

/DEV/SDA,/dev/sdb, .../dev/sdaa,/dev/sdab ...

different partitions on the same device:1, 2, ...

/DEV/SDA1,/dev/sda5

③ Hard disk storage terminology

Head : Head

Track: Tracks

Cylinder: Cylinder surface

SECOTR: sector,512bytes (minimum unit)

④HDD Disk Structure

CHS

512bytes    *   64 sector number /track    *    1024  track number / disc        256   head 8g

Fan Area number of Sectors / track / disc

(512bytes * Sector number /track *) the size of a cylinder: 8M * 1024x768 Track =8g

Unit: B KB MB GB TB PB EB ZB YB BB NB DB

(4) How to use partition space? (Each step will be explained in detail in the rear)

① Equipment Identification

② Device Partitioning

③ File System type formatting

④ Creating Entries in the /etc/fstab file

⑤mount mounting a new file system

(5) why partition?

① Optimization I/O performance

② Implementing disk space quota limits

③ Improve Repair speed

④ Isolation Systems and procedures

⑤ Installing multiple OS

⑥ with different file systems

(6) Two methods of addressing:CHS and LBA

CHS:

with 24bit bit addressing

where the first ten bits represent cylinder , the middle 8 bits represent head , and the back 6 bits represent sector.

Maximum addressing space 8GB

LBA (logical Block Addressing):

LBA is an integer that completes the disk-specific addressing by converting to CHS format

LBA uses a single bit address

Maximum addressing space 128PB

because CHS addressing is within approximately 8GB of the address space , so when the disk capacity is less than about 8GB , you can use CHS Addressing mode or LBA addressing mode; When disk capacity is greater than approx. 8GB , only LBA addressing is used

Ii. Introduction of the zoning

two ways to partition: MBR ,GPT

(1)mbr:master Boot Record ,1982 year, using Bit indicates the number of sectors, the partition does not exceed 2T

How to partition: Press Cylinder

0 Track 0 sector:512bytes

446bytes:boot Loader

64bytes : Partition Table

16bytes: identify a partition

2BYTES:55AA, End sign

4 Primary partition,3 Primary partition +1 extension (N logical partition )

Partition table (DPT) structure

(2) HDD master boot record MBR mainly consists of 3 parts

① the Master boot program (offset address 0000h--0088h ), which is responsible for loading from the active partition and running the system boot program.

error message data area, offset address 0089h--00e1h is an error message,00E2H--01BDH is all 0 bytes.

The ② partition table (dpt,disk, Partition table ) contains 4 partition entries, offset address 01BEH--01FDH, Each partition table entry has a length of eight bytes, a total of

Partition Entry 1 , partition entry 2 , partition entry 3 , partition item 4

③ End Glyph, offset address 01fe--01ff 2 byte value for end flag 55AA

(3)GPT partition

①gpt:guid ( globals Unique Identifiers partitiontable   Span style= "font-family: Arial" > supports 128 partitions, using 64 bit, support 8z ( 512byte/block ) 64z ( 4096byte/block )

use the -bit UUID (universally Unique Identifier) to represent the disk area and partition GPT Partition table automatically backed up at head and tail two parts with CRC Check bit

UEFI ( Unified Extension Firmware Interface ) hardware supports GPT , enabling the operating system to boot

The ②efi section can also be divided into 4 areas:EFI Information area (GPT header ), partition table, GPT partition, backup area

The first piece of the foundation is these, the next one is wonderful operation, don't miss ~ ~ ~

          I hope to help you, what's wrong please tell me ~

Linux Disk Management four--(1) disk structure, understanding partitions

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.