Friday, October 21, 2011

Computer Hard Drive Tutorial

Computer Hard Drive


Every computer must have a hard disk drive (commonly called a hard drive, hard disk, or abbreviated HDD). Your operating system is stored on the hard drive. Of course any other file can be saved there too. It is the main location where people save data. Having adequate hard disk storage for your needs is important. The main purpose of this page explains the difference between a IDE and SATA hard drive, although a brief description of SCSI, solid state, and flash drives are discussed as well. But first I explain some common terminology.

Capacity:
Capacity is the maximum amount of data a drive or disk (for example, a DVD disk) can store. Typical hard disk storage capacities today are either in gigabytes or terabytes. These sizes store enormous amounts of data. This is very useful when saving music and video, especially video files, which can get very large.

RPM:
RPM (Revolutions Per Minute) - Within a hard disk case are round platters (the actual disks) that are attached to a spindle that spins. The disks are written to or read from while spinning. One revolution is how many times the platters make a complete rotation. Disks in a HDD literally rotate thousands of times per minute. The greater the RPM, the faster data is read or written. 7200 RPM is typically what you will see in home computer hard drives.

Form Factor:
The form factor of a hard drive is the actual physical size of the case the platters are in. The main sizes are 3.5in and 2.5in.

Cache Memory:
A small amount of memory, usually 8, 16, or 32MB, is set aside for the most frequently accessed files. When one of these files is selected, it is retrieved from the cache. This reduces access time since the system does not have to search the drive for the data.

Types of Drives:
Now that the basics have been covered, let's look at some different kinds of drives. There are two main types used by home PCs and laptops: IDE/EIDE and Serial ATA (SATA).

IDE (Integrated Drive Electronics):
The IDE interface standard has been around for a very long time. The term interface in this sense means how the drive connects to the motherboard. As improvements were developed it later was called EIDE for Enhanced IDE. And after even further developments it has also come to be known as ATA (Advanced Technology Attachment). These drives connect to the motherboard via a flat, 80-wire cable to an IDE connector. Two drives can be attached on one cable. 

Computer Hard Drive cable
The speed of a hard drive is determined by how fast the connector can send data. Currently the primary drive rates are 100 MB/s and 133 MB/s - 133 MB/s being the maximum. These hard disks are commonly described by the abbreviation "ATA" followed by the speed of its connector (ATA 100, ATA 133).

IDE drive connectors use a parallel bus, meaning multiple bits are transmitted simultaneously. To distinguish between Serial ATA drives, IDE disks are also referred to as PATA (the "P" stands for parallel). 

Computer Hard Drive cable
To make it a little less confusing, here are some different names for IDE:
  • EIDE (Enhanced IDE)
  • ATA (Advanced Technology Attachment)
  • PATA (Parallel ATA)
Although there are still IDE drives around, Serial ATA is now the standard and is discussed next.


Serial ATA (SATA):
Today, SATA disk drives are the current standard and use a serial interface to transfer data, i.e. data is transmitted one bit at a time. Using a faster clock rate, sending one bit is faster than sending several with a slower clock, as with IDE. Data also travels along a single wire, reducing inteference. With SATA, one path is used for sending and another for receiving. With PATA, data is sent and received on one path.


The original SATA standard has a transfer rate of 150 MB/s (SATA-150). Now SATA can transmit up to 300 MB/s (SATA II or SATA-300), and 6 Gb/s (SATA 3), far surpassing PATA's 133 MB/s. SATA uses a 7-wire cable for connecting to the motherboard.


SATA hard drive


SCSI Drives:
SCSI (Pronounced "scuzzy") stands for Small Computer Systems Interface, and was originally developed to replace IDE before SATA came about. In addition to hard drives, other devices can use SCSI. Because PCs use either IDE or Serial ATA drives, I am not going to go into a lot of detail about SCSI, but I do want you to know that it exists and a PC is capable of using a SCSI drive if it has a SCSI controller.

SCSI is much faster than IDE. Several types developed over time: Narrow, Wide, Fast, Fast Wide, and Ultra. These refer to how much and how fast data is sent for each standard. The only one in use today is Ultra, itself consisting of various types. 8 or 16 devices are supported on one cable, depending on which kind is implemented. SCSI devices are a little more troublesome to configure than IDE and SATA and generally tend to be more expensive.

External Drives:
Hard disk drives can connect externally to a computer. The drive is placed in a case called an enclosure that contains a port(s) on the back for connecting to the computer via a cable. For quite some time enclosures used USB or Firewire. Now, many support any combination of USB, Firewire, and External SATA (eSATA) ports on the same encasement. External SATA is far faster than USB and Firewire. To use it, a computer must also have an eSATA connector. If it doesn't, a card can be purchased with the interface on it. Enclosures are manufactured to match the form factor of particular drive. 

External hard drive


Solid State Drives:
Solid State Drives, or SSDs, differ from traditional hard drives in that they contain flash memory rather than a motor, spinning platters, and a read/write head. A big advantage is that you do not have to concern yourself with drive failure due to some mechanical failure, and they require much less power to run.

Like standard drives they come as internal or external, IDE or SATA. Most are 2.5 inches.

A big disadvantage with solid state hard drives, however, is capacity and cost. Presently, most come in much smaller capacities than regular drives and are quite expensive. So you will have to decide if the cost is worth it.

Flash Drives:
Flash Drives are portable drives about the size of your thumb that use flash memory to store data. They replaced floppy disks years ago as the primary method of transporting data from place to place. The early ones only had a capacity of 8 or 16 MB megabytes. Now, storage is in the gigabytes which allows you to store large files such as music and pictures. They connect using a USB interface.


Flash drive

How to Install a Hard Drive


Before we get started, it should be noted that while the most common hard drives used today are SATA, the system I'm using is IDE based. Besides having different types of connectors, the installment procedure is basically the same. SATA is discussed later.

To start, look at the side of the hard drive. You should see some screw holes.

Note: There are a variety of computer cases and many don't use screws to install drives. Check the case's specifications.

Slide the drive into the drive bay so that the screw holes of the bay and drive are aligned. Then, insert the screws. 



Hard drive installation


Now, find the IDE connectors on the motherboard. They are labeled IDE1 and IDE2, although many modern boards have only one IDE connector.

IDE Connectors

Next, look at the IDE cable. The blue end plugs into the motherboard. Notice there's a notch on each connector. This is to ensure that you connect it correctly. It only fits one way. If this is the primary hard drive for the system, connect the cable to IDE 1.

IDE Cable

Now take the other end of the cable (black) and connect it to the 40-pin connector on the drive. Remember, the cable's notch makes it fit one way. Another way to tell if you're doing it correctly is to examine the cable. One side has a thin red stripe that runs the length of the cable. This red side is aligned with pin 1 on the drive.

IDE Cable

The last thing to attach is the power. Get a molex connector from the power supply, and insert it into the power connector. The yellow wire is always to the outside.

IDE power connection

That's it! To install a second IDE drive, it must be configured to be the slave drive by using the jumpers located between the 40-pin and power connectors. The default setting is master. Which jumper to use is listed on top of the drive. Attach it to the middle cable connector. 




How to Partition a Hard Drive

When you buy a brand new hard drive, you can't just install and start using it right away. It must go through a couple of processes to be prepared - partitioning and formatting. Partitioning a drive allows you to decide to either divide it up into smaller drives (each with its own drive letter) or leave it as one big drive. A main reason to split a drive into pieces is if you choose to have a dual or multi-boot machine, in other words, install more than one operating system such as Windows and Linux. Each OS is on its own separate space and you will see a menu during the boot process. Most home users though, are satisfied leaving their drive as one big partition. You may also notice a partitioned drive when you buy a computer. Many manufacturers will install a recovery program on a small portion of the drive and the operating system on the rest.

There are two types of partitions:

  • Primary - A bootable partiton, but you don't have to install an operating system. You can simply use it to store data. Only 4 primary partitions can exist on a drive. One of them must be set to active because you've got to have a default booting option.
  • Extended (optional) - An extended partition was developed to get around the 4 primary limit. Within an extended partition you may make as many drives (called logical drives) as you wish, well that is until you run out of disk space or drive letters. Unlike the primary, an operating system can't be started from a logical drive, and you can have just 1 extended partition. Keep in mind that the extended partition is not formatted (discussed below), but the logical drives you make within them.
**Note: Some people consider logical drives as a third type of partition.

Formatting:
As mentioned earlier, a drive must be formatted. Formatting a hard drive determines how data is stored and retrieved by using what is known as a file system. Once a partition is formatted it's referred to as a volume. Long ago in the days of DOS and earlier Windows versions the file system was FAT. FAT is an acronym for File Allocation Table. There were different versions, the last being FAT 32. This system had limitations - a partition could be no larger than 2 terabytes, you couldn't store a file larger than 4 GB, and security options were lacking. Starting with Windows NT, a new system called NTFS (New Technology File System) was born, and every operating system based on NT (2000 - Windows 7) can utilize NTFS. NTFS supports much larger volume and file sizes, offers encryption, and provides improved security features. NTFS formatted drives can read drives using FAT but not vice versa.

Partitioning a Drive in Windows:
Windows makes partitioning and formatting a drive quite easy.

1. Click Start, Right Click on Computer, and Choose Manage. This opens the Computer Management Window.

Partitioning a drive

Partitioning a drive

2. Double Click Storage, then double click Disk Management. You'll see a window showing all of your drives and their properties.

Partitioning a drive

The top part of the window shows drives that have already been formatted (remember they are called volumes), including my removable flash drive. The bottom half shows volumes and new drives. Notice to the right of Disk 0 there are three listings. This tells you one drive is separated into three pieces. Also notice the CD/DVD Drive is also shown. In this example I don't have a brand new drive installed, but if so, it would be listed at the bottom as Disk 2 or some other number depending on how many drives are already installed. To the right you would see the word unallocated meaning it has not been partitioned.

If you have a brand new drive you would right click on it and choose New Partition. A partition wizard window will open and easily guide you through the process of choosing the type of partition (primary or extended), how large you want it, the type of file system, whether or not you want to assign a drive letter, whether or not you want to format it at that time, and other options. Click finish when done. Then repeat the process again if you decide to make another partition. To format later, right click on a partition or logical drive and select format.

At some point you may need to reformat or repartition a drive. Doing so will erase all your data. Make sure you back up everything you want to keep. 


Installing SATA Drives:
Installing SATA drives is just like installing IDE's except for one major difference. Since SATA cables support one drive, there is no need for a slave configuration if you want to put in a second drive. Just use another connector. Many motherboards come with several SATA connectors and are labeled SATA 1, SATA 2, etc.
SATA connection

Plug one end of the cable into the motherboard and the other into the drive. Then attach the power. The cables fit one way. The boot drive's cable is inserted into SATA 1 on the motherboard.
SATA connection

No comments:

Post a Comment