Physical HD structure

  • Platter: circular disk where data is stored (often on both sides).
  • Tracks: concentric circles of data (particles) on a single platter.
  • Sector: a partition of a track, typically 512 bytes of data.
  • Cluster: a group of sectors (basic storage unit)
  • Cylinder: a collection of all the tracks from all the platters that are at the same radius.
  • Head: tip of the read/write actuator arm that does the reading and writing (two per platter).
  • A write action is the alignment of particles in the magnetic media on the platters.
  • A read action is the detection of how particles are aligned in magnetic media.
  • Seek Time: The amount of time required to move the read/write head from its current position to desired track.
  • Rotational latency: The amount of time to rotate the track when the read/write head comes to desired sector position. In simple disk, rotational latency is the time to rotate ½ disk to the access, iow the average rotational latency for a disk is half the amount of time it takes for the disk to make one revolution.
  • Transfer time: The amount of time taken to transfer the required data is called as transfer time. Transfer time depends on the total size of the track and the rotational rate of the disk.
  • Transfer Rate: The number of bytes transferred in one unit time is called as the transfer rate of the disk.

Hard disks come pre-formatted from the manufacturer facilities. Reformatting a drive does not reformat it at the 1's and 0's level. In essence, reformatting is just clearing the media.

Logical Block Addressing (LBA) was a “hack” to get around the upper limit placed on drive size (504 MB) by the IDE bus system. IDE drives used to have such a limit and LBA was a way to “lie” to the BIOS about the size of the disk, because current disks can be Terabytes large. Addressing is no longer done by cylinder, sector and head, but by a global disk number value for a sector. The geometry translation is done by the disk itself (which is not limited to 504 MB) and not BIOS and Bus system.

Metadata (512 data bytes costs 577 bytes in physical space):

  • ID information
  • Synchronisation fields
  • Error Correction Codes
  • Gaps

Bad sectors happen (excessive read/write operations, sudden voltage spikes, some viruses, corrupted boot records, wear out).

  • If a sector is detected to have gone bad, it is marked as such, and gets skipped. Some malwares use this.
  • Data in a bad sector may not be recoverable.
  • Modern HD's have reserved sectors that are then used instead.
  • Bad sectors are hidden from the OS.

If too many sectors go bad, the OS needs to be rewritten to other sectors. It may have in-built redundancy that will allow it to continue.

  • Mean Time Between Failures (MTBF) ratings are measured in hours as an indicator of the sturdiness of hard disk drives and printers. Disk drives for personal computers typically have MTBF ratings of about 500,000 hours. This means that of all the drives tested, one failure occurred every 500,000 hours of testing. But disk drives are typically tested only a few hours. Because of this, MTBF ratings are also predicted based on product experience or by analysing known factors such as raw data supplied by the manufacturer, which, according to Google, can not be trusted: Failure Trends in a Large Disk Drive Population (pdf), 2007.
  • Clusters are linked to each other by the OS and usually ordered on a disk using continuous numbers. A file does not have to reside in one continuous block but is rather broken up. The cluster size is determined when the disk volume is partitioned (larger volumes use larger cluster sizes) and range from 4 sectors (2048 bytes) to 64 sectors (32768 bytes).
  • Slack space is the space between an End-Of-File (EOF) and the end of the cluster. This means that with larger clusters, when a greater number of files is stored, much space is wasted as slack space.
  • Lost clusters are a result of a logical structure error (unlike bad sectors which are a result of physical disk errors), usually caused by interrupted file activities (rebooting at the wrong time).
  • Integrated Drive Electronics/Enhanced (IDE)
  • Small Computer System Interface (SCSI)
  • Advanced Technology Attachment (ATA)
    • Serial ATA (SATA, ESATA)
    • Parallel ATA