A disk drive is a device that allows a computer to read from and write data to a disk. The most common type of disk drive is a hard disk drive (HDD), and the term disk drive and hard disk drive are typically used interchangeably. Other types include optical drives, storage devices, and floppy drives. A disk drive is commonly found in PCs, servers, laptops, and storage arrays.
Disk drives can either be housed internally within a computer or housed in a separate box that is external to the computer. There are two types of popular disk drives that are used in computer internally, they are:
Hard Disk Drives
Solid State Drives
Hard disk drives and removable disk drives use a magnetic head, while an optical drive uses a laser. A disk drive differs from a solid state drive (SSD), which has no moving parts and offers greater performance but also costs more and generally offers less capacity.
As a disk drive is made up of many moving parts, some of the major components in a disk drive are:
Platter: The platter is the actual disk inside the drive that stores the magnetized data.
Spindle: The platters are attached at the center to a rod or pin called a spindle
Read/Write heads: Read/write heads read and write data to the platters. When one head is over a track, all other heads are at the same location over their respective surfaces.
Hard Disk Drives
Introduction
A hard disk drive (HDD) is a non-volatile computer storage device containing magnetic disks or platters rotating at high speeds. It is a secondary storage device used to store data permanently, random access memory (RAM) being the primary memory device. A hard drive fits inside a computer case and is firmly attached with the use of braces and screws to prevent it from being jarred as it spins. Typically it spins at 5,400 to 15,000 RPM. The disk moves at an accelerated rate, allowing data to be accessed immediately. Most hard drives use enhanced integrated drive electronics (EIDE) including cables and connectors to the motherboard. All data is stored magnetically, allowing information to be saved when power is shut off.
Introduced by IBM in 1956, HDDs were the dominant secondary storage device for general-purpose computers beginning in the early 1960s. HDDs maintained this position into the modern era of servers and personal computers, though personal computing devices produced in large volume, like cell phones and tablets, rely on flash memory storage devices. More than 224 companies have produced HDDs historically, though after extensive industry consolidation most units are manufactured by Seagate, Toshiba, and Western Digital. HDDs dominate the volume of storage produced (exabytes per year) for servers. Though production is growing slowly , sales revenues and unit shipments are declining because solid-state drives (SSDs) have higher data-transfer rates, higher areal storage density, somewhat better reliability,and much lower latency and access times.
Operation of Hard disk drive
The hard drive is the component that is used to permanently store data, this is why the term mass storage device is sometimes used to refer to hard drives.
A hard drive is made up of several rigid metal/glass/ceramic disks, stacked very close to one another and called platters. The term cylinder is used to refer to all the data stored vertically on each of the disks.
The disks turn very quickly around an axle in a counter-clockwise direction. A computer works in a binary mode. Hard drives hold millions of these bits, stored very close to one another on a fine magnetic layer a few microns thick, which is covered by a protective film.
They are read and written using read heads located on both sides of the platters. These heads are electromagnets that raise and lower themselves in order to read or write data.
These disks are laterally mobile so that the heads can sweep across their entire surface. However, the heads are linked to one another and only one of them can read or write at a given moment.
This entire precision mechanism is contained within a fully airtight case, as the smallest particle can degrade the disk's surface. This is why hard drives are closed shut with seals, and the warning "Warranty void if removed", as only hard drive manufacturers can open them (in particle-free cleanrooms).
How does it work?
The read/write heads are said to be inductive, meaning that they can generate a magnetic field. This is especially important in writing: The heads, by creating positive or negative fields, polarise the disk surface in a very tiny area, so that when they are read afterwards, the polarity reversal completes a circuit with the read head, that is then transformed by an analog-digital converter (ADC) into a 0 or 1 which can be understood by the computer
The heads start writing data from the edge of the disk (track 0), then move onward towards the centre. The data is organized in concentric circles called tracks, which are created by low-level formatting.The tracks are separated into areas (between two radii) called sectors, containing data (generally at least 512 octets per sector).The term cylinder refers to all data found on the same track of different platters. Finally, the term clusters (also called allocation units) refers to the minimum area that a file can take up on the hard drive. An operating system uses blocks. Blocks are groups of sectors (between 1 and 16 sectors). A small file may occupy multiple sectors (a cluster).
Solid State Drives
Introduction
A solid-state drive (SSD) is a solid-state storage device that uses integrated circuit assemblies to store data persistently, typically using flash memory, and functioning as secondary storage in the hierarchy of computer storage. It is also sometimes called a semiconductor storage device, a solid-state device or a solid-state disk,even though SSDs lack the physical spinning disks and movable read–write heads used in hard disk drives (HDDs) and floppy disks.
SSDs are typically more resistant to physical shock, run silently, and have higher IOPS and lower latency.SSDs store data in semiconductor cells. As of 2019, cells can contain between 1 and 4 bits of data. SSD storage devices vary in their properties according to the number of bits stored in each cell, with single-bit cells ("Single Level Cells" or "SLC") being generally the most reliable, durable, fast, and expensive type, compared with 2- and 3-bit cells ("Multi-Level Cells/MLC" and "Triple-Level Cells/TLC"), and finally quad-bit cells ("QLC") being used for consumer devices that do not require such extreme properties and are the cheapest per gigabyte of the fourSSDs made from RAM can be used for high speed, when data persistence after power loss is not required, or may use battery power to retain data when its usual power source is unavailable.
Operation of Solid State Drives
SSDs serve the same purpose as HDDs: they store data and files for long-term use. The difference is that SSDs use a type of memory called "flash memory, “SSDs are called "solid-state" because they have no moving parts.
If you took apart a typical HDD, you'd see a stack of magnetic plates with a reading needle---kind of like a vinyl record player. Before the needle can read or write data, the plates have to spin around to the right location.
On the other hand, SSDs use a grid of electrical cells to quickly send and receive data. These grids are separated into sections called "pages," and these pages are where data is stored. Pages are clumped together to form "blocks.“
When you have a fresh SSD, it's loaded entirely with blocks full of blank pages. When you write new data to the SSD, it can immediately write to those blank pages with blazing speeds. However, as more and more data gets written, the blank pages run out and you're left with random unused pages scattered throughout the blocks.
In HDDs, data can be written to any location on the plate at any time, and that means that data can be easily overwritten. SSDs can't directly overwrite data in individual pages. They can only write data to empty pages in a block.
So then how do SSDs handle data deletion? When enough pages in a block are marked as unused, the SSD commits the entire block's worth of data to memory, erases the entire block, then re-commits the data from memory back to the block while leaving the unused pages blank.
This means that SSDs become slower over time.
Types of Solid State Drives
There are 2 types of SSD available those are:
SATA-based SSDs
SATA-based SSDs are best for older computers that lack newer SSD connector types and have only SATA connections. A great way to boost the speed of an older computer with a spinning hard drive is to clone the drive to an SSD, and replace the Hard Drive with an SSD, increasing the computer’s ability to read/write data, possibly tenfold.
NVMe-based SSDs
NVMe, or Non-Volatile Memory Express, is a new controller used to replace AHCI, or Advance Host Controller Interface. NVMe promises lower latency by operating with higher efficiency, working with Solid State’s parallelization abilities by being able to run more than two thousand times more commands to or from the drive than compared to a drive on the AHCI controller.