Reprinted from: http://blog.csdn.net/tianxueer/article/details/2689117
General hard disk front affixed with product labels, mainly including manufacturers information and product information, such as trademarks, models, serial numbers, production date, capacity, parameters and master-slave setup method. This information is the basic basis for the correct use of the hard disk, and the following steps will describe their meaning.
The hard disk is mainly composed of the disk body, Control circuit board and interface components, 1-1 shows. The disc body is a sealed cavity. The internal structure of the hard disk usually refers to the internal structure of the disk, and the main control circuit board includes the hard disk BIOS, the hard disk cache (i.e. cache) and the main control chip unit, 1-2; the hard disk interface consists of a power outlet, a data interface and a master, a jumper, and 1-3.
Figure 1-1 the appearance of the hard drive
Figure 1-2 Control circuit board
Figure 1-3 HDD Interface
The power outlet is connected to the power supply to provide power for the hard drive. The data interface is a channel for data exchange between the hard disk and the motherboard and memory, and is connected using a 40-pin 40-wire (early) or 40-pin 80-wire (current) IDE interface cable. The newly added 40-wire is a signal shielding line for shielding crosstalk during high-speed, high-frequency data transmission. The middle of the main, slave disk jumper sockets, to set the main, from the hard disk, that is, set the access order of the hard drive. The setting method is usually labeled on the label outside the disc, and there are some markings on the interface, and the earlier hard disk may also be printed on the circuit board.
In addition, there is a vent hole on the surface of the hard drive (see figure 1-1), which is to keep the internal pressure inside the hard drive consistent with the external atmospheric pressure. Because the disc is sealed, so, this vent hole is not directly and internally communicated, but through a high-efficiency filter and the body of the connection, to ensure that the inner body of clean dust-free, the use of attention do not cover it.
1.2 Internal structure of the hard drive
The internal structure of the hard disk usually refers to the internal structure of the disc. The disk body is a sealed cavity, which is sealed with the head, disc (magnetic disc, disc) and other components, shown in 1-4.
Figure 1-4 Internal Drive structure
Hard disk disc is a hard magnetic alloy disc, the thickness is generally around 0.5mm, diameter is mainly 1.8in (1in=25.4mm), 2.5in, 3.5in and 5.25in 4, of which 2.5in and 3.5in platters are the most widely used. The speed of the disc is related to the size of the disc, and the larger the disc is, the lower the speed is due to the inertia and disc stability. Generally speaking, the speed of 2.5in hard disk is between 5 r/min~7 r/min, 3.5in hard disk speed is between 4 r/min~5 r/min, and 5.25in hard disk speed is 3 r/min~4. With the progress of technology, now the speed of the 2.5in hard disk has reached the highest speed of r/min,3.5in hard drive has reached the highest level of r/min.
Some hard drives only have one platter, and some have multiple discs. These discs are mounted on the spindles of the spindle motor and are rotated at high speed by the spindle motor. The capacity of each platter is called a single disc capacity, and the capacity of the hard disk is the sum of all the platters capacity. Early HDD due to the low single disk capacity, so, more platters, and some even up to 10 pieces, modern hard disk is generally only a few pieces of the disc. All platters in a hard drive are exactly the same, otherwise the control section is too complex. A brand of a series are generally used the same type of platters, using a different number of platters, there is a series of different capacity of the hard disk products.
The complete construction of the disk body is shown in 1-5.
Figure 1-5 The complete structure of the disk body
The hard drive uses a high-precision, lightweight head drive/positioning system. This system allows the head to move quickly on the disk and can be positioned precisely on the track specified by the computer instruction in a very short period of time. Currently, the track density is up to 5 400Tpi (tracks per inch) or higher; New methods are being researched, such as on-disk extrusion (or etching) of graphics, grooves, and spots as positioning and tracking markers to increase the density of the channel equal to that of the disc, thereby preserving disk drive speed, high density and high reliability , significantly increasing storage capacity.
The motor in the hard drive is a brushless motor, with the support of high-speed bearings, the mechanical wear is small and can be worked continuously for a long time. The high-speed rotating disk body produces obvious gyro effect, so it should not be moved when the hard disk is working, otherwise, the bearing's working load will be increased. In order to store and read information at high speed, the hard disk drive has a small head mass and inertia, so the drive's seek speed is significantly faster than the floppy drive and optical drive.
Hard drive head and head arm and servo positioning system is a whole. The servo positioning system consists of a coil behind the head arm and an electromagnetic control system fixed on the base plate. Due to the limitation of the positioning System, the head arm can only move between the internal and external tracks of the disc. As a result, the head is always on the platter, regardless of whether it is turned on or off, and the difference is that the head stays in the start-stop area of the disc when it is switched on, and the head "flies" over the disk.
How is the data on the hard drive organized and managed? The hard disk is first logically divided into tracks, cylinders, and sectors, as shown in the structural relationship 1-6.
Figure 1-6 Head, cylinder, and sector
Each face of each platter has a read-write head, and the disk surface area is divided by 1-7. The head near the surface of the spindle contact, that is, the smallest line speed place, is a special area, it does not store any data, known as the start-stop area or landing zone (Landing zone), outside the start-up area is the data area. In the outer ring, the furthest away from the spindle is the "0" track, where the hard disk data is stored from the outer ring. So, how does the head find the position of the "0" track? As you can see from figure 1-5, there is a "0" track detector, which is used to complete the initial positioning of the hard disk. The "0" track is so important that many hard drives are scrapped just because the "0" track is damaged, which is a pity. The repair technique for this failure is described in detail in a later section.
Figure 1-7 Start-stop and data area of the hard disk disc
Early hard drives need to run a program called parking before each shutdown, and the effect is to get the head back to the start-stop area. Modern hard drives have been designed to abandon this small, albeit uncomplicated, but unpleasant flaw. When the hard drive is not working, the head stays in the start-stop area and the disk spins when it needs to read and write data from the hard disk. When the rotational speed reaches the rated high speed, the head is lifted by the airflow generated by the disc rotation, and the head is moved to the area where the disc is stored. The spinning of the disc is quite strong enough to hold the head up and keep a small distance from the disc. The smaller the distance, the higher the sensitivity of the magnetic head to read and write data, and the higher the requirements for the parts of the hard disk. Early-design disk drives keep the heads flying a few microns above the disk surface. Some designs later reduced the flying height of the head on the disc to about 0.1μm~0.5μm, now reaching 0.005μm~0.01μm, which is only 1 per thousand of the diameter of the human hair. The air flow can not only disengage the head from the opening surface, but also keep it close enough to the surface of the disk, and closely follow the rolling motion of the disks, so that the head flight is in a strictly controlled state. The head must be flown above the disk surface, rather than touching the disc surface, which avoids scratching the magnetic coating and, more importantly, does not allow the magnetic coating to damage the head. However, the head also can not be too far away from the disk surface, otherwise, can not make the disk surface to achieve strong enough magnetization, difficult to read shavings on the magnetization flip (magnetic pole conversion form, is the way the actual record data on the disk).
Hard disk drive head of low flying height, fast speed, once a small dust into the hard disk seal cavity, or once the head and disk collision, it can cause data loss, forming a bad block, and even caused the head and disk damage. Therefore, the hard disk system seal must be reliable, in non-professional conditions can not open the hard disk sealing chamber, otherwise, the dust will accelerate the damage of the hard disk. In addition, the hard drive head of the seeking servo motor using voice coil rotary or linear motion stepper motor, in the servo tracking adjustment to accurately track the disc's track, so the hard disk work without impact collision, when moving should be handled with care.
This hard drive is a hard drive made with Winchest (Winchester) technology, so it is also known as Wen Pan. Its structural characteristics are as follows.
① heads, platters and motion mechanisms are sealed in the disc body.
② head in the start, stop contact with the disk, in the work due to the high-speed disk rotation, drive the head "suspended" on the disc on the flight status (aerodynamic principle), "suspended" height of about 0.1μm~0.3μm, this height is very small, figure 1-8 marked this height with hair, Soot and finger print size comparison, from here can intuitively "see" the height of how "high".
Figure 1-8 Disc structure and head height
③ head work with the disc is not directly in contact with, so, the magnetic head loading is small, the head can be done very delicate, the ability to detect the track is very strong, can greatly improve the bit density.
④ disk surface is very flat and smooth, can do mirror use.
The meanings of "disc", "track", "Cylinder" and "sector" are described below.
1. Panel number
Hard disk disks are generally made of aluminum alloy substrate, high-speed hard disk may also be made of glass substrate. Glass substrates are more likely to achieve the desired flatness and finish, and have a high degree of hardness. The head drive is the part that makes the head part move radially, usually there are two types of transmission device. One is the drive device of the stepper motor of the rack drive, and the other is the transmission device of the voice coil motor. The former is a fixed-projected transmission positioner, while the latter is returned to the correct position using servo feedback. The head drives are radially shifted by a small equidistant distance to transform the track.
Each disc of the hard disk has two disk faces (Side), that is, the upper and lower disk surface, usually each disk surface will be used, can store data, become a valid disc, there are very few hard disk face number is singular. Each of these effective discs has a disk face number, numbered sequentially from top to bottom, starting with "0". In the hard disk system, the disk face number is also called magnetic number one, because each effective disk face has a corresponding read and write head. Hard disk disc group in 2~14 tablets, usually have two or three platters, so the panel number (magnetic number one) for 0~3 or 0~5.
2. Track
The disk is divided into concentric circles when formatted, and these concentric circles are called tracks (track). Tracks are numbered sequentially from 0 in the outward order. Each disk of the hard drive has 300~1 024 tracks and more tracks on each side of the new high-capacity hard drive. The information is recorded in the form of a burst of pulses in which the concentric circles are not continuously recorded data, but are divided into segments of arcs that have the same angular velocity as the arcs. Because the radial length is not the same, therefore, the line speed is not the same, the outer ring line speed is larger than the inner ring line speed, that is, the same speed, the outer ring in the same time period, the circular arc length is larger than the circle across the arc length. Each arc is called a sector, and the sector is numbered starting with "1", and the data in each sector is read out or written as a unit. A standard 3.5in hard disk face typically has hundreds of to thousands of tracks. The track is "see" missing, but a special form on the disk magnetization of some magnetized areas, in the format of the disk has been planned.
3. Cylinder surface
The same track on all disks forms a cylinder, usually called a cylinder (Cylinder), and the head on each cylinder is numbered from top to bottom, starting with "0". Data read/write by the cylinder, that is, the head read/write data first in the same cylinder from the "0" head to operate, in turn, down in the same cylinder on different disk surface is the head of the operation, only in the same cylinder all the heads of all read/write completed after the head is transferred to the next cylinder surface, Since the selected head can only be switched electronically, the selected cylinder must be mechanically switched. The electronic switch is quite fast, much faster than the mechanical head moving towards the adjacent track, so the reading/writing of the data is performed on the cylinder rather than on the disk surface. That is, once a track is full of data, it is written on the next face of the same cylinder, and a cylinder is full before moving to the next sector to begin writing data. Reading data is also done in this way, which improves the read/write efficiency of the hard drive.
The number of cylinders (or the number of tracks per disk) of a hard drive depends on the width of each track (as well as on the size of the head), and also on the size of the distance between tracks determined by the positioning mechanism. For more in-depth information, please refer to other books, which are limited in length and are not covered here.
4. Sectors
The operating system stores information on the hard disk as a sector (Sector), with 512 bytes of data and some additional information per sector. A sector has two main parts: The identifier that stores the data location and the data segment that stores the data, as shown in 1-9.
Figure 1-9 The composition of the hard disk sector
An identifier is a sector header, including three numbers that make up the three-dimensional address of a sector: the head (or disk) where the sector is located, the track (or cylinder number), and the position of the sector on the track, the sector area code. The header also includes a field that shows whether the sector can reliably store the data, or whether a tag has been found that is not appropriate for a failure. Some hard disk controllers also have an indicator in the sector header that directs the disk to a replacement sector or track when an error occurs in the original sector. Finally, the sector header is terminated with a cyclic redundancy check (CRC) value, which is used by the controller to verify the readout of the sector header, ensuring accuracy.
The second major part of the sector is the data segment that stores the data, which can be divided into data and data-protection error-Correcting codes (ECC). During initial preparation, the computer fills this section with 512 virtual information bytes (the place where the actual data is stored) and ECC numbers corresponding to these virtual information bytes.
The sector header contains a sector area code that identifies the sector on the track. Interestingly, these sector codes are not physically numbered consecutively, and they do not have to be specified in any particular order. The design of the sector header allows the sector area code to be from 1 to a maximum, and in some cases up to 255. The disk controller does not care what number in the above range is arranged in which sector header. In very special cases, sectors can also share the same number. The disk controller doesn't even matter how big the data area is, just read the data it finds, or write the data it needs to write.
The simplest way to number a sector is to 1,2,3,4,5,6 sequential numbers. If the sectors are numbered sequentially around the track, then, during the process of processing a sector's data, the disk rotates too far, exceeding the interval of the sector (the interval is small), and the next sector that the controller reads out or writes to has passed through the head, perhaps a considerable distance. In this case, the disk controller can only wait for the disk to rotate for almost a week before the required sectors reach the head.
Obviously, to solve this problem, it is unrealistic to rely on the interval of the fan interval, which wastes a lot of disk space. Many years ago, an outstanding engineer at IBM came up with an ingenious way of not using sequential numbering for sectors, but using a crossover factor (Interleave) to number them. The crossover factor is represented by a ratio method, such as 3:1, which indicates that the 1th sector on the track is sector 1th, skips two sectors and 4th sector is sector 2nd, which continues until a logical number is assigned to each physical sector. For example, a disk with 17 sectors per track is numbered as a cross factor of 2:1: l,10,2,11,3,12,4,13,5,14,6,15,7,16,8,17,9, and the cross factor number by 3:1 is: l,7,13,2,8,14,3,9,15, 4,10,16,5,11,17,6,12. When setting the cross-factor of the 1:l, if the hard disk controller processes the information fast enough, all sectors on the read track need only be rotated for one week, but if the hard disk controller's post-processing action is not so fast, the number of laps on the disk is equal to the number of sectors on a track in order to read all the data on each track. When the crossover factor is set to 2:1, the head reads all the data on the track, and the disk only has to go for two weeks. If the cross factor of the 2:1 is still not slow enough, the number of weeks that the disk rotates is approximately the number of sectors of the track, and the crossover factor can be adjusted to 3:1,1-10 as shown.
Figure 1-10 Examples of effects of different cross-factors
Figure 1-10 shows a typical MFM (Modified Frequency modulation, improved FM coded) hard drive with 17 sectors per track, with three different sector cross-factor numbers drawn. The sectors on the most outer ring track (cylinder NO. 0) are numbered consecutively in simple order, equivalent to the sector crossover factor is 1:1. The sector of track 1th (cylinder) is numbered by the cross factor of 2:1, while track 2nd is numbered by the sector cross factor of 3:1.
In the early days of hard disk Management, setting the crossover factor required the user to do it themselves. When low-level format is used in the low-level format of the BIOS, it is necessary to specify the crossover factor, sometimes it is necessary to set several different values to compare its performance, and then to determine a better value, in order to improve the performance of the hard disk. Now the hard drive BIOS has solved this problem by itself, so the general low-level formatter no longer provides this option setting.
When the system stores the files on disk, in the manner of cylinder, head, and sector, i.e. all sectors that are first under the first head of the 1th track (that is, the first track of the 1th disc), and then the next head of the same cylinder, ..., a cylinder is stored full and then pushed to the next cylinder until the contents of the file are written to disk. The system also reads the data in the same order. read out the data by telling the disk controller to read out the cylinder number, the number of magnets, and the sector area code (three components of the physical address) of the sector. The disk controller directly steps the head assembly into the corresponding cylinder, selecting the corresponding head and waiting for the required sector to move to the head. When the sector arrives, the disk controller reads the header of each sector, compares the address information in these headers with the expected check-out head and cylinder number (i.e. seek), and then looks for the required sector code. When the disk controller finds the sector header, it decides whether to convert the write circuit or read the data and tail records depending on whether the task is a write sector or a read sector. When a sector is found, the disk controller must post-process information for that sector before continuing to look for the next sector. If the data is read, the controller calculates the ECC code for this data, and then compares the ECC code with the recorded ECC code. If the data is written, the controller calculates the ECC code for this data, which is stored with the data. The disk continues to rotate while the controller makes the necessary processing of the data in this sector. Since the post-processing of information takes a certain amount of time, during this time, the disk has been turned to a considerable angle.
The determination of cross-factor is a system-level problem. The crossover factor for a particular hard drive depends on the speed of the disk controller, the clock speed of the motherboard, the operating speed of the output bus connected to the controller, and so on. If the cross-factor value of the disk is too high, it takes more time to wait for the data to be deposited and read out on disk. If the cross factor value is too low, disk performance is greatly reduced.
As mentioned earlier, when the system writes information on disk, it goes to the next head of the same cylinder after writing a track, and then turns to the next cylinder when the cylinder is full. From one track on the same cylinder to another, from one cylinder to the next, each transition takes time, during which the disk remains rotated, which poses a problem: Assuming the system has just finished writing to a sector in front of a track, and has set the best cross factor ratio, Now that you are ready to write the first sector of the next track, you must wait until the head is converted so that the head assembly is ready to be positioned next. If this operation takes longer than a point, even though it is interleaved, the head will still arrive late. The solution to this problem is to move the entire sector area of the new track by about one or several sector positions, based on the position of the original track, which is the head twist. The head twist can be understood as the cross-factor between the cylinder and the cylinder, which has been set up by the production plant, and the user generally does not have to change it. It is difficult to change the head skew, but they only work when the file is long, beyond the end of the track to read and write, so the time loss caused by incorrect skew setting is much smaller than the loss caused by an incorrect sector crossover factor value. Crossover factor and head twist can be tested and changed using special tool software. More specific content is no longer detailed here, after all, now many users have not seen these parameters.
The sector area code is stored in the sector header, and the information about the sector crossover factor and the head skew is also stored here. Initially, the hard drive low-level formatter simply exercised the specialized function of the disk controller to complete the setup task. Since this process can destroy all the data on low-level formatted tracks, it is rarely used.
The sector crossover factor is set by the number written to the header of the sector, so each track can have its own cross-factor. In most drives, all tracks have the same crossover factor. But sometimes because of operational reasons, it can also lead to different sector crossover factors for each track. If the cross factor reset program works, due to power outage or human interruption, it will cause some track cross factor has changed, while the other tracks of the cross factor has not changed. This inconsistency has no adverse effect on the computer, except that the track with the best crossover factor works faster than the other tracks.
The structure and working principle of hard disk----reproduced