Hard Drive Basics


Figure 1Welcome to introduction to hard drives. In this article, we'll take a look at how hard disks are constructed and then we'll move on to consider how they are logically organized to store data through low-level and high-level formatting; what components make up a hard drive; how hard drives operate; how we judge their performance; and finally we'll take a brief look at some of the more popular interfaces they use to connect with PCB's such as a system motherboard.

This article has been split up into the following subtopics:
  1. Hard Drive Construction
  2. Hard Drive Components
  3. Operation at a Glance
  4. Hard Drive Performance
  5. Hard Drive Interfaces
  6. Formatting, Partitions and Organization
  7. File Systems at a Glance

Hard Drive Construction


The term, “hard disk”, seems to convey the idea that a hard disk is one, solid unit. A hard disk is typically composed of many “disks”, called platters, positioned one above another but not touching each other. This is possible because the platters are attached to a spindle that is installed vertically through the center of each platter, holding them rigidly in parallel position with equidistant gaps between them. The spindle also allows the whole platter assembly to be spun in unison, as one cylindrical device.

The image below depicts a slightly older Parallel ATA (PATA) hard disk drive that has been opened, revealing its spindle, platters and other inner components.

Figure 2

A hard disk is conceptually said to be made up of many cylinders. For example, if a platter has 400 tracks, the disk it is a part of is said to have 400 cylinders. This is because platter 1 has 400 tracks on its top surface and below that 400 tracks on its bottom surface; platters 2 and 3 right below it have the same configuration. This means that track 1 is actually part of a cylinder 6 track 1s tall, and so on for each of the other 399 tracks.

Today's platters actually have tens of thousands of tracks broken down into thousands of sectors per track.

The hard disk platters are increasingly made of glass or glass/ceramic composites, as opposed to the earlier aluminum alloy use. The glass and glass/ceramic composites are smoother; thinner; and more heat resistant. All these factors improve the performance and energy use of the hard disks.

Hard disks are assembled in very clean manufacturing environments. They must be dust free and they must be kept dust free. This is largely because the read/write heads, discussed below, float very close to the platter surfaces. If dust gets into the drive, the dust could hang up one of the heads and pull it down into the platter. At the hard drive's operational speeds, this would likely scratch the surface of the hard drive and damage the data it was storing.

Hard drives are, therefore, “packaged” in a functionally airtight container called a “head disk assembly”, or HDA. This assembly allows air into the container but it is equipped with air filters to keep out dust. The air inside the container is maintained in partial vacuum. Internal air and external air are equalized to keep the disk operating optimally. Air inside the sealed disk is necessary because as the disk powers up and starts to spin generating air flow, the air flow lifts the entire head/slider/arm assembly and helps keep the read/write heads “floating” above the tracks on the platter surfaces. It is from this floating position that the read/write heads do their job.

Here we have the next step up from the PATA hard drive interface. This is a Serial ATA (SATA) hard drive which among other things introduced smaller data and power connectors and cables. Most modern desktop computers as of this writing come with SATA hard drives similar to this one.

Figure 3

An even newer hard drive interface known as Serial Attached SCSI (SAS) can be found in high end server and workstation computers. SAS is surprisingly similar to SATA because its data and power pins/connectors are nearly identical to SATA with the exception the connector segments were merged into one unit, which makes it possible to attach an SAS drive to a SATA controller.

Figure 4

We'll talk a little more about interfaces like PATA, SATA and SAS later in this article. Fow now though, let's continue talking about the construction of hard disk drives.

In a hard drive, each platter's smooth top and bottom surface is coated with a thin magnetic film. This surface is composed of many small magnetic "regions". Each of these regions is used to store a single bit of binary information. Data can be written to, stored and read from these magnetic regions.

A read/write head will be positioned over the top and bottom surface of each platter. If the hard disk is composed of 3 platters which is common today, the hard disk will have 6 read/write heads; one above and one below each platter. If the hard disk had 5 platters, it would have 10 read/write heads.

And, as the platters spin in unison, each of the read/write heads is positioned over the same sector as each of the other read/write heads. This is part of the design and synchronization of hard disks.

Consumer hard drives have ranged in size from .85" to 8". Most hard drives used today are 3.5" or 2.5". The smaller drives, though lacking something in storage surface area, require less power to operate than the larger drives. And, they can be manufactured with more platters to increase their storage capacity.

Hard Drive Components


Figure 5

Logic Board


The hard drive logic board (or "controller") is the brains of the hard drive. It directs the hard drive's activity and serves as the interpreter between the hard drive and the CPU. The processor talks to the hard drive through the hard drive controller circuit board installed in the hard disk drive. In some setups such as SCSI and/or RAID, the hard drive may also connect to a SCSI or RAID controller opposed to the hard drive being directly connected to the system motherboard itself.

Actuator, Voice coil and Motor Assembly


The actuator is the “power” end attached to the actuator arm. It is connected to a voice coil. Through the operation of the voice coil, it moves the actuator arm back and forth over the disk surface in an arc which allows the actuator arm to be moved into position above every data track and sector on the disk. The actuator/voice coil assembly lifts the actuator arm up and moves it over the track where the data sought is located, positioning it and more accurately its read/write heads where the heads need to be to read or write data.

Figure 6This operation is fascinating to watch. The actuator assembly can move the actuator arm and its heads at a feverish pace. Remember, the disk in operation is spinning at more than 7200 revolutions per minute, rpm (120 revolutions per second); some disk drives 10,000 rpm (166 revolutions per second) or more.

But the actuator/coil assembly can “bounce” the actuator arm with its heads back and forth across the disk; at an incredible pace; stopping, reading, or writing; and moving on to the next sector as if in one fluid motion, though it is in fact stopping; hovering; and waiting for the sector it needs to pass beneath it as the disk spins.

Figure 7

Actuator Arms


The actuator arm is somewhat long and triangular in shape with the base being attached to the actuator, itself. Earlier actuators tended to be solid metal pieces but increasingly today they are largely “hollow”, more like a triangular frame.

Sliders


Read/write heads are very small. They are attached to only slightly larger mountings called sliders. The sliders are then attached to the narrow, pointed end of the much larger actuator arm. The read/write heads are mounted to the sliders. The sliders, at rest, contact both the top and bottom surfaces of each platter on the hard drive. On some drives, their resting place on the disk is a safe place called a “landing zone”. On other drives, their resting place is off the disk in a location called a “loading/unloading dock”. Both designs are meant to keep the head/slider assembly from landing on sectors of the disk which contain data and destroying the data.

The slider is designed as an "air bearing". As the platter spins and air current builds up within the drive, the air current, brushing against the slider's contoured surface, lifts it off the platter and suspends it above the platter. Then, from their position mounted to the "floating" slider, the read/write heads are able to do their job.

Figure 8

Read/Write Heads


Each read/write head has two functional parts. One is able, through power supplied to it, to “read” the pattern of magnetized bits turned on or turned off beneath it on the sector. The other is able to write or re-write over the sector by changing the magnetic direction “on(+)” or “off(-)” of the bits.

Hard Disk


As has been stated previously, the hard disk is actually a "cylinder" of platters held together by virtue of being mounted on a spindle. Each platter has two storage surfaces, its top surface and its bottom surface, called "heads". Both surfaces are coated with a thin magnetic film capable of storing data.

Figure 9

Spindle and the Spindle Motor


The spindle holds the hard disk assembly composed of platters together rigidly. This makes the platters then, in essence, one unit. When the spindle turns, it turns all the platters together at the same time as one unit. The spindle is powered by its own motor at very high speeds, turning the disk at speeds that range from 5400 rpm...to 7000 rpm...to 15,000 rpms, depending on the hard drive's capacity.

Operation at a Glance


When the CPU needs data, it communicates with the hard disk controller/logic board and relays to it that information. The controller physically locates the data on the disk and then sends the actuator/voice coil into action to retrieve it. It relays an "address" which contains the cylinder; track, and sector to look in although typically the hard drive will be instructed not just to read one sector but a number of related and contiguous sectors, called "clusters".

The actuator moves the actuator arm over the track where the data is stored. Once there, with the read/write heads floating above the track, the hard drive waits for the cluster desired to pass under the read/write heads. Once the proper cluster passes under the read/write heads, they magnetically “read” the data stored in the cluster and this information is passed to a temporary storage location (buffer). From there, the data is sent over the peripheral bus to the host adapter to the motherboard's bus to the CPU.

Hard Drive Performance


Hard disk performance is affected by a number of factors that include the following: access time; rotational delay; and transfer time.

Access Time


Access time is the time it takes the controller to initiate the actuator to move the actuator arm with the read/write heads into position over the proper track containing the sector/cluster which needs to be read. The access time for desktop drives is reported to be about 9 milliseconds but it varies depending on where the actuator arm was when it was first sent into action. If it has to travel far from the track it was on to the track it is being sent to, the access time will be greater.

Rotational Delay


Once the read/write heads are in place over the correct track, rotational delay comes into play. Rotational delay is the amount of time the read/write heads must wait before the desired sector/cluster rotates into position beneath them where it can be read. The faster the disk spins, the less rotational delay there will be. So, one of the ways to increase disk performance is to raise the speed at which disks spin. High end disks spin in the range 10,000 to 15,000 rpms; desktop hard drives are typically in the range 5400 to 7200 rpms.

Transfer Speed


Next, disk performance is affected by the data transfer rate. Disk to buffer data transfer rates are somewhere around 70 MBs/sec. Buffer to computer data transfer rates are around 300 MBs/sec.

Hard Drive Interfaces


Hard drives, like any other computer devices, have to be "connected" to the computer's operating system which controls hardware and software and makes them work. These connections are called interfaces and there are a number of interfaces which have been developed to connect hard drives to the computer system, itself.

Enhanced Integrated Drive Electronics (EIDE)


Most hard drives interface with the system (motherboard) via Enhanced Integrated Drive (or Device) Electronics, or EIDE. Two popular types of EIDE interfaces are Parallel Advanced Technology Attachment (PATA), which transmits data through parallel lines, and Serial Advanced Technology Attachment (SATA), which transmits data through a single line, 1.5 - 3.0 Gbits/sec. With ATA, there is connectivity for two hard drives per controller port.

Small Computer System Interface (SCSI)


A second interface is Small Computer System Interface, or SCSI, pronounced "scuzzy", used for more high-end applications of up to 15 devices. The multiple drives are attached to the SCSI bus. Depending on the SCSI interface in question, ranging from 2 MBs/sec to 320 Mbs/sec, however, the addition of more devices will overload the available bandwidth.

Serial Attached SCSI (SAS)


Then, there is Serial Attached SCSI, or SAS. SAS is incredibly scalable, supporting impressive storage topologies of over 16,000 devices. The serial transmission of data requires fewer connections and eliminates the SCSI bus. It still uses the very capable SCSI protocol. SAS performs at 3 – 12 Gbits/sec.

IEEE 1394 Firewire


Another interface is IEEE 1394, or Firewire which is popular in multimedia and entertainment applications. Firewire 400 performs at approximately 100 – 400 Mbits/sec; Firewire 800 at 400 – 3200 Mbits/sec; Firewire 1600 at 1.6 Gbits/sec; Firewire 3200 at 3.2 Gbits/sec; and future improvements are expected to raise the speed to 6.4 Mbits/sec. Firewire can connect 63 devices.

Fibre Channel


Then, there is Fibre Channel, another high-end interface which competes with SCSI and allows connection of up to 126 devices. Fiber channel performs at 2 – 4 Gbits/sec.

Formatting, Partitions and Logical Organization


Now let's take a look at the initial formatting of a hard disk called low-level formatting followed by the operating system's “partitioning” and logical organization of the disk called high-level formatting, which gets it ready for actual use.

Low-level Formatting


When manufactured, hard drives are given a low level formatting that divides them into tracks. These tracks are concentric circles which start near the outer rim of the disk and decrease in circumference as they near the center of the disk. Tracks are then divided into sectors (the smallest accessible unit on a disk), typically 512 bytes in size.

On earlier hard disk platters, each track had the same number of sectors. This meant that sectors on inner tracks, near the center of the disk, were smaller in size than sectors on the outer tracks of the disk, yet all stored the same amount of information. If, then, a smaller sector on a track near the center of the platter held the same data storage capacity as a larger sector on a track near the outer area of the disk platter, that storage space on the outer sector was actually being wasted.

To address this concern, platters were “marked” during initial formatting so that all storage sectors were the same size in dimension and had the same 512 bytes of storage capacity. The result is that the most outlying track on a platter has the most sectors and the sectors per track decline as we move from the outside of the track to the center. The inner most “center” track has the fewest sectors because it is the sector with the smallest circumference. This method of marking platters in manufacture is called zone bit recording.

High-level Formatting


When a new hard drive is installed and detected by a computer's BIOS and the operating system itself, it is then time to prepare the hard drive for use through the process of creating one or more partitions and performing high-level formatting on each, giving them their own empty file system and installing a boot sector.

Today, computers with a Windows operating system typically use an NTFS file system (an improvement over the older FAT file system) and on Linux systems you'll typically find an Ext3 file system in use.

Partitions can be either a primary partition or an extended partition which is a primary partition that can be further divided into secondary partitions or "logical partitions". When using your system, both primary and logical partitions will appear as though they are their own physical hard drive.

In the first 512 byte sector of a hard disk drive, called a boot sector, information about the hard disk's partitions and file systems is stored in what is called a master boot record (MBR). The MBR contains the actual boot record and details about how the disk is partitioned. However, the MBR is not actually stored "in" the first partition, but right in front of it on the disk in a main boot record area (the first 512 bytes).

The first partition on a drive is called the active partition, or system partition, because it is used to boot the OS. On a Windows system, this partition is usually designated as being the "C" drive.

Figure 10

The most important partition is a primary system partition because it usually stores a computers operating system. In the image above, the primary "system" partition is on the far left and the other two "drives" on the right, or more accurately "logical drives", were created from an extended partition. On a Windows system, each of these drives is assigned a letter name such as C, D, E etc. Other drives such as CD-ROM's are also given a letter designation. This way, we can specify which physical device and partition folders and files are stored on, such as C:\Users\Tim\Documents.

Some form of installation media such as a CD (a "bootable CD" or "installation CD") is used to perform the initial partitioning and formatting of a hard drive on a new computer, installing the actual operating system itself on a primary partition and optionally creating additional partitions.

During this process, a hard drive may be divided into multiple partitions. If we have a 50 GB hard drive, we might create a system partition allocated 25 GB's of space for system and program files (the "C" drive); a second 10 GB partition for work files (the "D" drive); and a third 15 GB partition for multimedia files (the "E" drive). However, most computer users are not aware of partitions and generally have only a single partition, utilizing the entire physical disk.

File Systems at a Glance


At this point we've talked a little about the process of partitioning and formatting a hard disk, and I mentioned how that process included installing file systems. Let's now take a look at exactly what a file system is and what they have to do with hard disks.

File System Defined


In the simplest of terms, a file system is a “method” for storing, organizing, manipulating and accessing the folders and files on a computer partition. File systems are typically unique and dependent upon host operating systems. Windows, Linux and Mac all have their own methods of storing and organizing files. On Windows systems we use NTFS; Linux offers an array of file systems to choose from like Ext3, Ext4 and ReiserFS; and on Mac computers there is the HFS file system, among others.

File System Classifications


File systems can be classified as being either a 1) disk file system like NTFS and Ext3, which are file systems that store files on some sort of disk storage device like a hard drive; a 2) network file system such as SMB and NFS, which facilitate accessing files over a computer network through some kind of remote file access protocol; or 3) a special purpose file system which is any type of file system that doesn't fall into the disk or network classification.

Responsibility of a File System


The most basic responsibility of a file system is to create a “map” between an operating system's basic unit of logical storage, called clusters, to the physical cylinders, tracks and sectors on a hard disk which the hard disk's controller can understand. A file system also stores meta data about files, which is “data about data” such as file names, the size of files, when they were created or modified and so on.

Modern file systems usually provide many other services beyond mapping and meta data. One example is journaling support, which is where a log is written in a “journal” every time the file system is to be changed, such as saving or deleting a file. These kinds of file systems are much less likely to become corrupted if power to a computer abruptly fails or a system crash occurs.