News

Inside the Digital Vaults: A Deep Dive into Computer Data Storage

Edit:Backup-Q Browse:178 Time:2024-05-15

Computers are incessant record-keepers, always storing and retrieving data. Yet, this data cannot possibly be entered by users via keyboard alone. Hence, the need for storage devices. A variety of storage devices exist within computer systems, such as hard drives, floppy disks, MO drives, CDs, DVDs, tape drives, USB flash drives, and the newer generation of Blu-ray drives. Not to mention the more sophisticated storage solutions like Storage Area Networks (SANs) and Network Attached Storage (NAS) used in large-scale computing environments. Among these, the hard drive is arguably the most common.

 

The Anatomy of a Hard Drive

Have you ever seen the inside of a hard drive? They come in 3.5-inch and 2.5-inch sizes, depending on whether they are for desktop or mobile computers. Let's focus on the 3.5-inch hard drives typically used in desktop computers. A hard drive is composed of numerous circular platters, mechanical arms, read/write heads, and a spindle motor. The data is actually inscribed on magnetic platters, and the reading and writing are primarily done by the heads mounted on mechanical arms. When in operation, the spindle motor spins the platters, and the mechanical arm extends to allow the heads to read and write data on the platters.

Since a single platter has limited capacity, some hard drives contain two or more platters. Data on the platters is written in a manner akin to Figure 0.2.5. As the platters are round and data is read and written by a mechanical arm, they must rotate to enable data access. The design initially involved cutting concentric circular blocks on the platters, forming a circle where the mechanical arm's head can read and write. This block is the smallest physical storage unit on a disk, known as a sector. Sectors on the same concentric circle combine to form a track. When there are multiple platters, tracks on all platters at the same position form a cylinder.

We understand that the outer circle of concentric circles is larger, occupying more space than the inner circles. To make efficient use of this space, the outer circles have more sectors, as shown in Figure 0.2.5. Moreover, when the platter spins once, the outer circle has more sectors, so writing data on the outer circle allows more data to be read and written in one rotation than the inner circle. Data reading and writing typically start from the outer circle and move inward, which is the default method. Additionally, traditional hard drive sectors were designed to be 512 bytes in size, but as hard drive capacities have increased, most high-capacity drives now use 4KB sector designs to reduce data fragmentation, an important consideration when purchasing.

 

Disk Partitioning and Interfaces

Due to different sector designs, there are legacy MBR (MS-DOS Compatible Mode) and newer GPT modes for disk partitioning. In GPT, partitions are usually divided by sector numbers, unlike the old MS-DOS method which used cylinder numbers. We will delve into disk management in Chapter 7.

To enhance disk transfer speeds, interfaces connecting the disk to the motherboard have evolved, resulting in various types of interfaces, including SATA, SAS, IDE, and SCSI for internal disks, and USB, eSATA for external disks. IDE has been replaced by SATA, and SCSI by SAS. We will focus on SATA, USB, and SAS interfaces.

The SATA interface, as shown in the ASUS motherboard diagram, is the slot for SATA drives. This interface uses a slim connection cable, with each device requiring a separate SATA cable. Due to the slim design, SATA has replaced the older IDE interface, offering better installation and ventilation within the case. The number of SATA slots on a motherboard is not fixed, and each slot is numbered. When connecting SATA drives to the motherboard, it's important to pay attention to the slot numbers. The current SATA version is 3.0, with speeds reaching 600MB/s, and each generation is backward compatible, albeit with significant speed differences.

 

SAS and USB Interfaces

SAS, the successor to SCSI, is faster than SATA and typically used in workstations or large computers for higher read/write speeds and stability. However, it is more expensive and usually not found on personal computer motherboards, requiring an external adapter card for support.

USB interfaces are common for external disks. Traditional USB speeds were slow, with USB 2.0 having a theoretical speed of about 60MB/s, far from the 80-120MB/s transfer rates of traditional hard drives. To improve USB transfer rates, USB 3.0 was developed, with even newer versions like USB 3.1 in the works.

 

Solid State Drives (SSDs)

Traditional hard drives have a significant drawback: they require a motor to spin the platters, causing considerable read delay. SSDs, on the other hand, use flash memory to create high-capacity devices with no moving parts, resulting in no read delay and power efficiency. Early SSDs had a limited write cycle, leading to a relatively short lifespan. However, modern SSDs from reputable manufacturers can last five to six years or more.

SSDs are incredibly fast. For instance, using a top-tier Intel SSD as a server's read system disk, the read and write speeds can reach up to 500MB/s, nearly the theoretical limit of SATA 3.0. In recent years, when testing disk performance, a unique measurement unit called Input/Output Operations Per Second (IOPS) has become significant. A higher IOPS value indicates more operations per second, signifying better performance.