Hard Disk Drive Operation


The basic physical construction of a hard disk drive consists of spinning disks with heads that move over the disks and store data in tracks and sectors. The heads read and write data in concentric rings called tracks , which are divided into segments called sectors , which normally store 512 bytes each (see Figure 9.5).

Figure 9.5. The tracks and sectors on a disk.

graphics/09fig05.gif

Hard disk drives usually have multiple disks, called platters , that are stacked on top of each other and spin in unison, each with two sides on which the drive stores data. Most drives have one, two, or three platters, resulting in two, four, or six sides. The identically aligned tracks on each side of every platter together make up a cylinder (see Figure 9.6). A hard disk drive normally has one head per platter side, with all the heads mounted on a common carrier device or rack. The heads move radially across the disk in unison ; they cannot move independently because they are mounted on the same carrier or rack, called an actuator .

Figure 9.6. Hard disk cylinders .

graphics/09fig06.gif

Originally, most hard disks spun at 3,600rpmapproximately 10 times faster than a floppy disk drive. For many years , 3,600rpm was pretty much a constant among hard drives. Now, however, most drives spin even faster. Although speeds can vary, modern drives normally spin the platters at either 4,200, 5,400, 7,200, 10,000, or 15,000rpm. Most standard-issue drives found in portable systems spin at the slower 4,200 or 5,400rpm speeds, with a few high performance models now available that spin at 7,200rpm. The 10,000 or 15,000rpm drives are normally found only in very high performance desktop-based workstations or servers, where their higher prices, heat generation, and noise can be more easily dealt with. High rotational speeds combined with a fast head-positioning mechanism and more sectors per track are what make one hard disk overall faster than another.

The heads in most hard disk drives do not (and should not!) touch the platters during normal operation. However, on most drives, the heads do rest on the platters when the drive is powered off. In most drives, when the drive is powered off, the heads move to the innermost cylinder, where they land on the platter surface. This is referred to as CSS (contact start stop) design. When the drive is powered on, the heads slide on the platter surface as they spin up, until a very thin cushion of air builds up between the heads and platter surface, which causes the heads to lift off and remain suspended a short distance above or below the platter. If the air cushion is disturbed by a particle of dust or a shock , the head can come into contact with the platter while it is spinning at full speed. When contact with the spinning platters is forceful enough to do damage, the event is called a head crash . The result of a head crash can be anything from a few lost bytes of data to a completely ruined drive. Most drives have special lubricants on the platters and hardened surfaces that can withstand the daily "takeoffs" and "landings" as well as more severe abuse.

Some newer drives do not use CSS design and instead use a load/unload mechanism, which does not allow the heads to contact the platters, even when the drive is powered off. First used in the 2.5-inch form factor notebook or laptop drives, where resistance to mechanical shock is more important, load/unload mechanisms use a ramp positioned just off the outer part of the platter surface. When the drive is powered off or in a power-saving mode, the heads ride up on the ramp. When powered on, the platters are allowed to come up to full speed before the heads are released down the ramp, allowing the airflow (air bearing ) to prevent any head/platter contact.

Because the platter assemblies are sealed and nonremovable, the track densities on the disk can be very high. Hard drives today have up to 96,000 or more tracks per inch (tpi) recorded on the media (for example, Hitachi Travelstar 80GH). Head disk assemblies (HDAs), which contain the platters, are assembled and sealed in clean rooms under absolutely sanitary conditions. Because few companies repair HDAs, repair or replacement of the parts inside a sealed HDA can be expensive. Every hard disk ever made eventually fails. The only questions are when the failure will occur and whether your data is backed up.

Caution

It is strongly recommended that you do not even attempt to open a hard disk drive's HDA unless you have the equipment and the expertise to make repairs inside. Most manufacturers deliberately make the HDA difficult to open, to discourage the intrepid do-it-yourselfer. Opening the HDA voids the drive's warranty.


Many PC users know that hard disks are fragile, and comparatively speaking, they are certainly one of the more fragile components in your system. That being the case, it comes as somewhat of a surprise to the students in some of my PC Hardware and Troubleshooting or Data Recovery seminars when I run various hard disks with the covers removed, and in some cases I have even removed and installed the covers while the drives were operating! Those drives continue to store data perfectly to this day with their lids either on or off. Of course, I do not recommend that you try this with your own drives.

Tracks and Sectors

A track is a single ring of data on one side of a disk. A disk track is too large to manage data effectively as a single storage unit. Many disk tracks can store 100,000 or more bytes of data, which would be very inefficient for storing small files. For that reason, tracks are divided into several numbered divisions known as sectors . These sectors represent arc-shaped pieces of the track.

Various types of disk drives split their disk tracks into different numbers of sectors, depending on the density of the tracks. For example, floppy disk formats use 836 sectors per track, although hard disks usually store data at a higher density and today can have 900 or more sectors per track physically. The sectors created by the standard formatting procedure have a capacity of 512 bytes, which has been one constant throughout the history of the PC. In order to be compatible with most older BIOS and drivers, drives will usually perform an internal translation so that they pretend to have 63 sectors per track when addressed in CHS (cylinder, head, sector) mode.

The sectors on a track are numbered starting with 1, unlike the heads or cylinders that are numbered starting with 0. For example, a 1.44MB floppy disk contains 80 cylinders, numbered 079, and two heads, numbered 0 and 1, whereas each track on each cylinder has 18 sectors numbered 118.

When a disk is formatted, the formatting program creates ID areas before and after each sector's data that the disk controller uses for sector numbering and for identifying the start and end of each sector. These areas precede and follow each sector's data area and consume some of the disk's total storage capacity. This accounts for the difference between a disk's unformatted and formatted capacities . Note that most modern hard drives are sold preformatted and only advertise the formatted capacity. The unformatted capacity is usually not mentioned anymore. Another interesting development is that many new drives use what is called No-ID sector formatting , which means that the sectors are recorded without ID marks before and after each sector. This means that more of the disk can be used for actual data.

Each sector on a disk normally has a prefix portion, or header , that identifies the start of the sector and contains the sector number, as well as a suffix portion, or trailer , that contains a checksum (which helps ensure the integrity of the data contents). Many newer drives omit this header and have what is called a No-ID recording , allowing more space for actual data. With a No-ID recording, the start and end of each sector are located via predetermined clock timing.

Each sector contains 512 bytes of data. The low-level formatting process normally fills the data bytes with some specific value, such as F6h (hex) or some other repeating test pattern used by the drive manufacturer. Some patterns are more difficult for the electronics on the drive to encode/decode, so these patterns normally are used when the manufacturer is testing the drive during initial formatting. A special test pattern might cause errors to surface that a normal data pattern would not show. This way, the manufacturer can more accurately identify marginal sectors during testing.

Note

The type of disk formatting discussed here is a physical or low-level format, not the high-level format you perform when you use Windows Explorer or the DOS FORMAT program on a disk. See the section "Disk Formatting" later in this chapter to learn about the difference between these two types of formatting.


The sector headers and trailers are independent of the operating system, the file system, and the files stored on the drive. In addition to the headers and trailers , gaps exist within the sectors, between the sectors on each track, and also between tracks, but none of these gaps contain usable data space. The gaps are created during the low-level format process when the recording is turned off momentarily. They serve the same function as having gaps of silence between the songs recorded on a cassette tape. The prefix, suffix, and gaps account for the lost space between the unformatted capacity of a disk and the formatted capacity. For example, a 2MB (unformatted) floppy has a formatted capacity of 1.44MB, and an older 38MB unformatted capacity hard disk (for instance, Seagate ST-4038) has a capacity of only 32MB when it is formatted. Because the ATA and SCSI hard drives you purchase today are low-level formatted at the factory, the manufacturers now advertise only the formatted capacity. Even so, nearly all drives use some reserved space for managing the data that will be stored on the drive.

Disk Formatting

Two formatting procedures are required before you can write user data to a disk:

  • Physical (low-level) formatting

  • Logical (high-level) formatting

When you format a blank floppy disk, Windows Explorer or the DOS FORMAT command performs both types of formats simultaneously . If the floppy was already formatted, DOS and Windows will default to doing only a high-level format.

A hard disk, however, requires two separate formatting operations. Moreover, a hard disk requires a third step, between the two formatting procedures, to write the partitioning information to the disk. Partitioning is required because a hard disk is designed to be used with more than one operating system. Using multiple operating systems on one hard drive is possible by separating the physical formatting in a procedure that is always the same, regardless of the operating system used and the high-level format (which is different for each operating system). Partitioning enables a single hard disk drive to run more than one type of operating system, or it can enable a single operating system to use the disk as several volumes or logical drives. A volume or logical drive is any section of the disk to which the operating system assigns a drive letter or name .

Consequently, preparing a hard disk drive for data storage involves three steps:

  1. Low-level formatting (LLF)

  2. Partitioning

  3. High-level formatting (HLF)

Low-level Formatting

During a low-level format, the formatting program divides the disk's tracks into a specific number of sectors, creating the intersector and intertrack gaps and recording the sector header and trailer information. The program also fills each sector's data area with a dummy byte value or a pattern of test values. For floppy disks, the number of sectors recorded on each track depends on the type of disk and drive. For hard disks, the number of sectors per track depends on the drive and the controller interface.

Originally, PC hard disk drives used a separate controller that took the form of an expansion card or was integrated into the motherboard. Because the controller could be used with various disk drives and might even have been made by a different manufacturer, some uniformity had to exist in the communications between the controller and the drive. For this reason, the number of sectors written to a track tended to be relatively consistent.

The original ST-506/412 MFM controllers always placed 17 sectors per track on a disk, although ST-506/412 controllers with RLL encoding increased the number of sectors to 25 or 26 per track; ESDI drives had 32 or more sectors per track. The drives found in portable PCs can have anywhere from 17 to 900 or more sectors per track, and the upper figure continues to rise in newer models.

Virtually all ATA and SCSI drives use a technique called z oned-bit recording (ZBR), sometimes shortened to zoned recording , which writes a variable number of sectors per track. Without zoned recording, the number of sectors, and therefore bits, on each track is a constant. This means the actual number of bits per inch will vary. More bits per inch will exist on the inner tracks, and fewer will exist on the outer. The data rate and rotational speed will remain constant, as will the number of bits per track. Figure 9.7 shows a drive recorded with the same number of sectors per track.

Figure 9.7. Standard recording, where the same number of sectors comprise every track.

graphics/09fig07.gif

A standard recording wastes capacity on the outer tracks because they are longer and yet hold the same amount of data (more loosely spaced ) as the inner tracks. One way to increase the capacity of a hard drive during the low-level format is to create more sectors on the disks' outer cylinders than on the inner ones. Because they have a larger circumference, the outer cylinders can hold more data. Drives without zoned recording store the same amount of data on every cylinder, even though the tracks of the outer cylinders might be twice as long as those of the inner cylinders. The result is wasted storage capacity, because the disk medium must be capable of storing data reliably at the same density as on the inner cylinders. When the number of sectors per track is fixed, as in older controllers, the drive capacity is limited by the density of the innermost (shortest) track.

Drives that use zoned recording split the cylinders into groups called zones , with each successive zone having more sectors per track as you move outward from the center of the disk. All the cylinders in a particular zone have the same number of sectors per track. The number of zones varies with specific drives, but most drives have 10 or more zones.

Figure 9.8 shows a drive with zoned-bit recording.

Figure 9.8. Zoned recording, where the number of sectors per track increases within each zone, moving out from the center.

graphics/09fig08.gif

Another effect of zoned recording is that transfer speeds vary depending on which zone the heads are in. A drive with zoned recording still spins at a constant speed; because more sectors exist per track in the outer zones, however, data transfer is fastest there. Consequently, data transfer is slowest when reading or writing to the inner zones. That is why virtually all drives today report minimum and maximum sustained transfer rates, which depend on where on the drive you are reading from or writing to.

As an example, Table 9.2 shows the zones defined for a Hitachi Travelstar 7K60 2.5-inch notebook drive, the sectors per track for each zone, and the resulting data-transfer rate.

Table 9.2. Zoned Recording Information for the Hitachi Travelstar 7K60 60GB 2.5-inch Hard Disk Drive

Zone

Sectors per Track

Data-Transfer Rate (MBps)

720

44.24

1

704

43.25

2

696

42.76

3

672

41.29

4

640

39.32

5

614

37.72

6

592

36.37

7

556

34.16

8

528

32.44

9

480

29.49

10

480

29.49

11

456

28.02

12

432

26.54

13

416

25.56

14

384

23.59

15

360

22.12

512 bytes per sector, 7,200 rpm

This drive has a total of 54,288 tracks on each platter surface and, as you can see, the tracks are divided into 16 zones. It is not essential for all the zones to be the same size; this is up to the drive engineers . Zone 0 consists of the outermost tracks, which are the longest and contain the most sectors: 720. In most cases the inner zone has half the number of sectors per track as the outer zone, although this may vary slightly as well. Because each sector is 512 bytes, each track in this zone can therefore provide about 368,640 bytes of user data storage, although the 360 sector tracks in zone 15 can hold only 184,320 bytes.

Thus, with zoned recording, this drive has an average of about 545 sectors per track. Without zoned recording, the number of sectors per track would be limited to 360 over the entire surface of each platter. Using a zoned recording provides a 51% increase in the storage capacity of this particular drive.

Notice also the difference in the data-transfer rates for each of the zones. The tracks in the outermost zone (0) yield a transfer rate of 44.24MBps, which is 100% faster than the 22.12MBps of the innermost zone (15). This is one reason you might notice large discrepancies in the results produced by disk drive benchmark programs. A test that reads or writes files on the outer tracks of the disk naturally yields far better results than one conducted on the inner tracks. It might appear as though your drive is running more slowly, when the problem is actually that the test results you are comparing stem from disk activity on different zones.

Another thing to note is that this drive conforms to the ATA-6 specification and is capable of running in Ultra DMA mode 5 (also called Ultra-ATA/100 or UDMA-100), which results in a transfer speed of 100MBps. As you can see, that is entirely theoretical because the true media transfer speed of this drive varies between about 22MBps and 44MBps, averaging about 33MBps overall. The interface transfer rate is just that: what the interface is capable of. It has little bearing on the actual capabilities of the drive.

Drives with separate controllers used in the past could not handle zoned recording because no standard way existed to communicate information about the zones from the drive to the controller.

With SCSI and ATA disks, however, formatting individual tracks with different numbers of sectors became possible because these drives have the disk controller built in. The built-in controllers on these drives are fully aware of the zoning algorithm and can translate the physical cylinder, head, and sector numbers to logical cylinder, head, and sector numbers so that the drive appears to have the same number of sectors on each track. Because the PC BIOS is designed to handle only a single number of sectors per track throughout the entire drive, a zoned drive must run by using a sector-translation scheme.

The use of zoned recording enables drive manufacturers to increase the capacity of their hard drives by 20%50% compared with a fixed sector-per-track arrangement. All modern hard disk drives today use zoned recording.

Partitioning

Creating a partition on a hard disk drive enables it to support separate file systems, each in its own partition.

Each file system can then use its own method to allocate file space in logical units called clusters or allocation units . Every hard disk drive must have at least one partition on it and can have up to four partitions, each of which can support the same or different type file systems. Three common file systems are used today:

  • File Allocation Table (FAT) This is the standard file system supported by DOS and Windows 9x/Me. FAT partitions support filenames of 11 characters maximum (eight characters plus a three-character extension) under DOS, and 255 characters under Windows 9x (or later). The standard FAT file system uses 12- or 16-bit numbers to identify clusters, resulting in a maximum volume size of 2GB.

    Using FDISK, you can create only two physical FAT partitions on a hard disk driveprimary and extendedbut you can subdivide the extended partition into as many as 25 logical volumes. Alternative partitioning programs, such as Partition Magic, can create up to four primary partitions or three primary and one extended.

  • File Allocation Table, 32 bit (FAT32) An optional file system supported by Windows 95 OSR2 (OEM Service Release 2), Windows 98, Windows Me, and Windows 2000/XP.

    FAT32 uses 32-bit numbers to identify clusters, resulting in a maximum single volume size of 2TB or 2,048GB.

  • Windows NT File System (NTFS) The native file system for Windows NT/2000/XP that supports filenames up to 256 characters long and partitions up to (a theoretical) 16 exabytes. NTFS also provides extended attributes and file system security features that do not exist in the FAT file system.

Up until the release of XP, FAT32 was by far the most popular file system. Because NTFS is native to XP, NTFS is now becoming more popular in newer systems. Still, the FAT file system is accessible by nearly every operating system, which makes it the most compatible in a mixed OS environment. FAT32 and NTFS provide additional features but are not universally accessible by other operating systems.

Partitioning normally is accomplished by running the disk-partitioning program that comes with your operating system. The name and exact operation of the disk partitioning program varies with the operating system. For example, FDISK is used by DOS and Windows 9x/Me for this task, whereas the DISKPART command or the Disk Management snap-in component of the Computer Management service is used with Windows XP. FDISK, DISKPART, and other disk-partitioning tools enable you to select the amount of space on the drive to use for a partition, from a single megabyte or 1% of the drive up to the entire capacity of the drive, or as much as the particular file system will allow. Normally, it is recommended to have as few partitions as possible, and many people ( myself included) try to stick with only one or two at the most. This was more difficult before FAT32 because the maximum partition size for a FAT16 partition was only 2GB. With FAT32, the maximum partition size can be up to 2,048GB. Note that Windows 2000 and XP refuse to format a FAT32 volume over 32GB, even though they will recognize existing FAT32 volumes up to the 2,048GB limit.

Caution

FDISK, DISKPART, and other disk-partitioning tools included in operating systems cannot be used to change the size of a partition; all it can do is remove or create partitions. The act of removing or creating a partition destroys and/or loses access to data that was contained in the partition or was on that part of the disk. To manipulate partitions without destroying data, you can use third-party utility programs, such as Partition Magic from PowerQuest or Partition Commander from V-Communications.


After a drive is partitioned, each partition must then be high-level formatted by the operating system that will use it.

High-Level Formatting

During the high-level format, the operating system writes the structures necessary for managing files and data on the disk. For example, FAT partitions have a Volume Boot Sector (VBS), two copies of a file allocation table (FAT), and a root directory on each formatted logical drive. These data structures enable the operating system to manage the space on the disk, keep track of files, and even manage defective areas so they do not cause problems.

High-level formatting is not really a physical formatting of the drive but rather the creation of a table of contents for the disk. In low-level formatting, which is the real physical formatting process, tracks and sectors are written on the disk. As mentioned, the DOS and Windows FORMAT command can perform both low-level and high-level format operations on a floppy disk, but it performs only the high-level format for a hard disk. Low-level formats of ATA and SCSI hard disk drives are performed by the manufacturer and should almost never be performed by the end user. The only time I do a low-level format of an ATA or SCSI drive is when I am attempting to repair a format that has become damaged (parts of the disk become unreadable), or in some cases when I want to wipe away all data on the drive.



Upgrading and Repairing Laptops
Scott Muellers Upgrading and Repairing Laptops, Second Edition
ISBN: 0789733765
EAN: 2147483647
Year: 2003
Pages: 182
Authors: Scott Mueller

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net