19. Disk Management-Detailed disk structure

Source: Internet
Author: User

Catalogue

The role of disk

    • The structure of the disk

      • HDD interface

      • Common HDD Profile

      • Internal drive structure

      • HDD Disk surface structure

    • How disks are partitioned

    • Naming rules for physical devices

    • File system

    • File system type

    • File system and Data sheet

    • Operation process of hard disk on server

The role of disk

Because the computer has a hard disk device so that we can save the game after the record and not to start again, because the computer data is the core, in the work, the site's access speed and server running state and disk performance is inseparable from

The structure of the disk HDD Interface

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/86/F2/wKiom1fPh0vDl-rmAAWvNFEerLo727.png "title=" 1.png " alt= "Wkiom1fph0vdl-rmaawvnfeerlo727.png"/>

There are three common types of equipment:

Parallel: ide:133mb/s scsi:640mb/s
Serial port: sata:6gbps sas:6gbps usb:480mb/s
Rpm:rotations per minute

Common HDD Profile

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/86/F2/wKiom1fPh12T4B8aAAUe0iAR0fM951.png "title=" 2.png " alt= "Wkiom1fph12t4b8aaaue0iar0fm951.png"/>

The hard disk's surface is usually marked with information about the drive, such as disk capacity, serial number, production date, production place, etc.

Internal Drive Structure

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/86/F1/wKioL1fPh2nj5o_cAANJtY1SduA487.png-wh_500x0-wm_3 -wmp_4-s_2799841961.png "title=" 3.png "alt=" Wkiol1fph2nj5o_caanjty1sdua487.png-wh_50 "/>

The disc is fixed on the rotary axis, the motor drives the shaft to rotate, the manipulator is equipped with a magnetic head, the head is suspended on the disk surface, and the machine arm can be stretched to seek the road.

HDD disk surface structure

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/86/F2/wKiom1fPh3ejq-SIAAZbZU5BCxU099.png "title=" 4.png " alt= "Wkiom1fph3ejq-siaazbzu5bcxu099.png"/>

Each platter is swapped into n concentric circles, called tracks, which are really used to access data, and how much data can be stored on the track, depending on the modern technology

Now the hard drive are both read and write, the so-called double-sided is a disk on the bottom of the can read and write, the same position on each disk will have a same number, all the same number of tracks called the cylinder, each track on the track is divided into several arcs, these arcs are the disk sector

How disks are partitioned

According to the internal structure of the hard disk, all the heads are moving at the same time, if you want to read a file data, only on one disk to operate more than at the same time on all other disk surface operation takes a long, in addition, according to the physical movement principle, the external magnetic moral reading and writing speed is much faster than the internal track,

Naming rules for physical devices

The hard disk device is composed of a large number of "sectors", where the first sector holds the master boot record and partition table information. A single sector capacity of 512bytes composition, the master boot record needs to occupy 446bytes, the partition table is 64bytes, the Terminator occupies 2bytes, and each record one partition information needs 16bytes, then the problem, as if only 4 partition information can be recorded?

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/86/F1/wKioL1fPh4Wi42PAAAA9c4PQ-hQ465.png "title=" 5.png " alt= "Wkiol1fph4wi42paaaa9c4pq-hq465.png"/>

Therefore, operators will generally choose to use 3 primary partition with an extended partition method, the expansion partition can create an infinite number of logical partitions, so that we can use logical partition to meet the requirements of multi-partition, of course, here you only need to understand why the primary partition can not exceed 4.

Linux systems are all files, so hardware is nothing. Since the file must have a name, the Device Manager (UDEV) of the system kernel automatically regulates the hardware name so that we can guess the approximate properties of the device and partition information through the device name, and Udev will always run as a daemon and listen to the uevent from the kernel to manage/ The device file under the Dev directory.

Udev will dynamically add or remove device files from the/dev directory based on the uevent issued by the kernel, and the naming process is as follows:

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/86/F2/wKiom1fPh5GQ-uIrAAEWXuWV8yg895.png "title=" 6.png " alt= "Wkiom1fph5gq-uiraaewxuwv8yg895.png"/>

The common hardware names are as follows:

Hardware Device file name

IDE Device/dev/hd[a-d]
SCSI/SATA/U Plate/DEV/SD[A-P]
Floppy/dev/fd[0-1]
Printer/dev/lp[0-15]
Optical/dev/cdrom
Mouse/dev/mouse
Tape drive/dev/st0 or/dev/ht0 (IDE device)

Because now the IDE device is very rare, so the general hard disk device will start with "/DEV/SD", and a host can have more than one hard disk, the system will use A-P to represent 16 different hard disks (the default is assigned from a) and the partition number is also very fastidious.

The primary partition number ends at 1 to 4, in order (you can also specify the assigned number).
The logical partition starts with number 5 in order (you can also specify the assigned number).

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/86/F2/wKiom1fPh53xRD-MAABeiTVmrHE864.png "title=" 7.png " alt= "Wkiom1fph53xrd-maabeitvmrhe864.png"/>

1. First, the/dev directory is all hardware.
2. Next, the SD begins with a storage device.
3. Then a represents the first identified device.
4. The last 5 represents that it is a logical partition.

In a nutshell: "This is the logical partition numbered 5 in the first hard drive device," As in physical storage:

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/86/F2/wKiom1fPh6rQ7GRSAABZFuGUyQ4440.png "title=" 8.png " alt= "Wkiom1fph6rq7grsaabzfuguyq4440.png"/>

File system

A file system is the method and data structure used by the operating system to explicitly store files on a device or partition; The method of organizing files on a storage device. The software structure that manages and stores the file information in the operating system is called the file management system, referred to as file system.

From a system perspective, a file system is a system that organizes and distributes the space of a file storage device, which is responsible for storing files and protecting and retrieving the files deposited. Specifically, it is responsible for creating files for users, deposit, read, modify, dump files, control file access, security control, logging, compression, encryption and so on.

File system type
Linux 文件系统:  :ext2(Extended file system), ext3,ext4, xfs (SGI ), btrfs (Oracle ), reiserfs,jfs( AIX ), swap
光盘:iso9660
Windows :fat32, ntfs
Unix: FFS (fast ), UFS (unix ), JFS2
网络文件系统:NFS, CIFS
集群文件系统:GFS2, OCFS2 (oracle) )
分布式文件系统:ceph, moosefs, mogilefs, glusterfs,Lustre
RAW :未经处理或者未经格式化产生的文件系统
File system and Data sheet

The role of the file management system is to make the hard drive reasonable planning, so that users can properly set up files, write, read, modify, dump files and control files, and in the Linux system support more than dozens of kinds of file management system to choose from, common as follows:

EXT3 is a log file system in the abnormal downtime to avoid file system data inconsistencies, automatic repair data inconsistencies and errors, however, the general reorganization of the file system is quite time consuming (especially the capacity of large hard disk), of course, there is no guarantee that 100% data is not lost. It will record the write action of the entire disk in advance (every detail), so it can be traced back to the interrupted part after an abnormal outage. (Ext3 currently only supports 32,000 subdirectories)

EXT4 can be a successor to the EXT3, as the default file management system for the RHEL6 system, which supports a larger file system to 1EB (1EB=1,073,741,824GB and can have an unlimited number of subdirectories), and the Ext4 file system can allocate block blocks in bulk and " Extents "greatly improves read and write efficiency.

operation process of hard disk on server

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/86/F2/wKiom1fPiNKj2qDlAALrLjld188939.png "title=" 9.png " alt= "Wkiom1fpinkj2qdlaalrljld188939.png"/>


This article from "Live by the Sea like Waves" blog, please be sure to keep this source http://zhang789.blog.51cto.com/11045979/1847181

19. Disk Management-Detailed disk structure

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.