Part 1 – Hard Disk Drive
Most computing devices come with some form of permanent storage device so that the data stored is retained even when the device is not powered up. This is the same for the virtual private server (VPS).
The storage device stores the virtual machine and all the files created in each of the VPS instance.
The two predominant storage devices found in today’s computing devices are the hard disk drive (HDD) and solid-state drive (SSD). Although they serve the same purpose, the HDD and SSD are based on fundamentally different technologies.
In this three-part series, we will be taking a detailed look at each of the different storage technology before we compare them in order to better determine which is the one to use under the different circumstances.
For this first article, we will dive in for a closer look at the hard disk drive or HDD for short.
What is a Hard Disk Drive (HDD)?
A hard disk drive (HDD) is an electro-mechanical device and a form of magnetic storage, just like cassette tapes and floppy discs of the 1980s and early 1990s. Although it can come in different sizes, the two common ones are 3.5-inch for desktop computers and 2.5-inch for laptops. In terms of capacity of modern HDD, the smallest you can find is 500 gigabyte (GB) and the largest at the time of this writing is 16 terabytes (TB) or 16,000GB.
How does the HDD work?
A HDD is made up of many components, of which, we will be looking at three in detail:
1. Rigid disk (aka platter), which is how the term “hard disk drive” came about
2. Disk read-and-write head
3. Hard disk controller
Below is an image of the insides of a HDD, which is hidden underneath a metallic cover that maintains a clean and stable environment for safe storage and retrieval of data.
Note: Please do not remove the cover of a working HDD as that will stop it from working and cause data loss. VantageVPS cannot be held responsible for any data losses suffered by the removal of a functioning HDD’s cover.
As per the above image, platters are the grey-coloured disks, which in actuality are extremely reflective and shiny, giving them a more silverish than greyish look. The long triangular arm above the platter is the actuator arm. It is attached to the voice coil actuator near the top of the image and the read/write head is on the other end. The disk controller is not visible from the image as it is on the other side of the HDD enclosure where the circuit board is located.
Hard Disk or Platter
A modern HDD comes with one or more platters fitted on a common spindle. The platters consist of a substrate and a magnetic medium. The substrate can be made of either an aluminium alloy, or a mixture of glass and ceramic. Both sides of each platter is then coated with a layer of ferromagnetic material, and protected by a carbon layer. Depending on the HDD (eg. storage capacity, physical size), there could be anywhere between one to five platters. Typically, there is a maximum of five platters as additional platters would introduce stability issues due to air turbulence created during the spinning of the platters.
Data are stored on the magnetic layers in binary format. Each of those layers is divided into billions of tiny regions where they could each be independently magnetised to represent a “1” or a “0”. The regions are then organised into sectors and tracks. A track is a concentric ring that contains multiple sectors. Each sector contains a fixed amount of data, typically 512 bytes for older drives or 4096 bytes for modern drives.
Depending on the HDD and the environment it operates in (e.g. an energy-efficient portable device, a personal computer or a high-performance server), the platter(s) can spin at anywhere between 4,200 to 15,000 rounds per minutes (RPM). In the case of consumer-grade HDD, the platter(s) typically spin at either 5,400 RPM or 7,200 RPM.
Hard Disk Controller
The hard disk controller (HDC) is a part of the system on chip (SOC) that the HDD needs in order to function. Some of the responsibilities the HDC have are as follows:
1. Provides a storage interface (e.g. SATA, PATA) so that the system can communicate with the HDD and vice versa.
2. Translates instructions received from the computer through the host interface into a series of analog signals the hard disk can understand.
3. Spins the platters for data read and write.
4. Moves the read/write heads for them to read or manipulate the information residing on the platter(s).
5. Converts the analog signals received from the read/write heads into digital signals the computer can understand.
6. Identifies bad-sectors and remaps the logical sector to another physical sector
Read/Write Head
A pair of disk read/write heads, one for each platter surface, are responsible for the writing or reading of data. They are mounted on a set of actuator arms attached to the voice coil actuator. The actuator moves the arms together, which in turn moves the read/write heads on an arc, enabling each head to access the entire surface of the platter as it spins.
The read/write heads were originally built with both read and write elements as a single piece. However, modern hard drives have their read and write elements built separately for better optimisation and innovation. One such innovation is the use of vertical instead of horizontal recording in which the magnetic poles are arranged in up or down orientations instead of left or right orientations. This innovation alone contributed to the dramatic growth in HDD storage capacity. However, the fundamental purposes of the read/write head has not changed.
The read element in its simplest design is made out of a ferromagnet with a wire coil. It is responsible for picking up on the changing magnetic polarisation on the platter. The change in magnetic field generates a current on the wire coil as described by Faraday’s law of induction. These currents are then converted into digital signals the host computer can understand.
The write head is an electromagnet. Its sole purpose is to modify the magnetic polarisations on the platter so that each magnetic region in the track represents either a “1” or “0” to represent data.
Reading and Writing Data
When the host system needs to read or write data to the HDD, it will send the logical address of where to read or write the data. Once the signal arrives at the host interface, the HDC will translate that logical address to the physical address based on the partition table. It then spins the platters and moves the read/write heads to their starting sectors. As the platters are fixed to the same spindle, the starting sectors will be the same for all.
When writing or saving a file, the HDC will split the file into smaller chunks so that each chunk can fit into a sector. Files or their chunks that are smaller than the sector will still take up the whole sector. The HDC will then determine which part of the file goes to which platter surface. The read-and-write heads are moved into positions while the platters spin. To program a “1”, the write head will change the magnetic pole on the platter surface to south-north orientation. To program a “0”, the magnetic pole orientation will be changed to north-south orientation. The good thing about a HDD is its ability to overwrite the same region on the platter without much penalty.
And during a read operation, as the read heads fly across the platter surfaces, they pick up on the change in magnetic poles. The change generates an electrical current on the electrical coil within the read head. Then the controller will measure the resulting currents and translate them into digital signals the host system can understand. Then it is returned to the host adapter via the storage interface and the host system will take over the processing of the signals.
With this, we finished our coverage on how a HDD works.
In the next article, we will delve into how solid-state drives work and you will see how different the two types of drives are at the fundamental level.
Hi, I do think this is a great blog. I stumbledupon it 😉 I am going to return yet again since I book marked it. Money and freedom is the greatest way to change, may you be rich and continue to help other people.