Sub topic 1
What persistent storage does in a PC
Persistent storage keeps your operating system, applications, and files when the power is off. This chapter sets up the model the rest of the tutorial builds on: what storage does, how it differs from memory, and how a PC uses it from power-on to shutdown. Later chapters cover the specific devices (HDDs, SSDs, flash media) and the RAID levels that combine them.
Prerequisites
This chapter assumes you already have the following:
- Basic familiarity with PC components such as the motherboard, power supply, and expansion slots.
- The difference between storage and memory (RAM), at least in outline. This chapter sharpens that distinction.
- Comfort with units such as GB, TB, and Gbps.
Volatile versus non-volatile
Computer data lives in two broad kinds of hardware.
- Volatile memory loses its contents when power is removed. RAM is the main example.
- Non-volatile (persistent) storage keeps its contents without power. Hard disk drives (HDDs), solid-state drives (SSDs), USB flash drives, and SD cards are all non-volatile.
The CPU cannot run code directly from a drive. It fetches instructions and data from RAM, so a program must first be copied from storage into RAM. This is why storage speed shows up as load times, while RAM size shows up as how many things you can run at once.
| Property | RAM | Persistent storage |
|---|---|---|
| Keeps data without power | No | Yes |
| Typical access time | Tens of nanoseconds | SSD: tens to hundreds of microseconds; HDD: several milliseconds |
| Typical capacity | 8 GB to 64 GB in a desktop | 256 GB to many TB |
| Cost per GB | Highest | Lowest (HDD cheapest) |
| Role | Working space for running programs | Long-term home for programs and data |
The exam often tests this contrast. If a scenario says the data must survive a reboot or power loss, the answer involves storage. If it says the system slows when many applications are open, think RAM first.
The storage hierarchy
PC memory and storage form a hierarchy. Each step down is larger, cheaper per GB, and slower.
Only the lower three tiers are persistent. Many systems use two of them together. A common design puts a small SSD in the system for the operating system and applications, and a large HDD for bulk files like video and backups.
What a PC stores, and when it uses storage
Storage is involved at every stage of a PC's day.
At boot
- When you power on, the firmware (UEFI or BIOS) runs a power-on self-test and finds the boot device.
- The firmware reads a boot loader from the drive.
- The boot loader loads the operating system kernel from the drive into RAM.
- The OS loads drivers, services, and your desktop from the drive.
If the firmware finds no bootable drive, you see errors such as "No boot device found" or "Operating system not found." On the exam, this symptom points to a failed or unseen drive, a wrong boot order, or a damaged boot record.
During normal use
Storage holds several kinds of content.
- The operating system files.
- Installed applications.
- User data, such as documents, photos, and settings.
- The page file (Windows) or swap space (Linux), which acts as overflow for RAM.
- The hibernation file, which saves the contents of RAM so the PC can resume after fully powering off.
The page file explains a common symptom. When RAM fills up, the OS pushes data to storage. Storage is far slower than RAM, so the system slows down sharply. This is called thrashing when it gets severe. On an HDD it feels much worse than on an SSD.
At shutdown
The OS flushes any cached writes to the drive before power is cut. Pulling the power during a write can leave files or the file system damaged. This is one reason hot-swappable hardware and safe-removal procedures exist, topics covered in later chapters.
Logical structure: partitions and file systems
A new drive is just a pool of blocks. Before an OS can use it, two things must happen.
- Partitioning divides the drive into one or more regions. The partition table is stored using a scheme such as MBR or GPT.
- Formatting writes a file system into a partition, such as NTFS, exFAT, ext4, or APFS. The file system tracks which blocks belong to which file.
This distinction explains a frequent support case. A drive can be healthy and visible in Disk Management but have no drive letter or no file system. The hardware works, and the logical structure is missing.
Identifying the drive in your system
Two short commands show what kind of drive a machine has. On Windows, PowerShell reports media type and bus type:
Get-PhysicalDisk | Select-Object FriendlyName, MediaType, BusType, SizeMediaType shows HDD or SSD. BusType shows the connection, such as SATA or NVMe. On Linux, lsblk lists whole disks, and the ROTA column (rotational) is 1 for a spinning HDD and 0 for a non-rotational drive such as an SSD:
lsblk -d -o NAME,ROTA,SIZE,TYPEYou will use these checks later when choosing or troubleshooting storage, so it is worth running one on your own machine now.
Capacity units and the missing gigabytes
Drive makers use decimal units: 1 TB is 1,000,000,000,000 bytes. Windows reports sizes in binary units (powers of 1024) but labels them GB and TB. The two systems differ, so a new "1 TB" drive appears smaller in the OS. The following script shows the conversion.
advertised_bytes = 1 * 10**12 # 1 TB as sold
os_gib = advertised_bytes / 2**30 # binary gibibytes
print(round(os_gib, 1)) # 931.3The drive is not defective. The same bytes are being counted with a different unit. File system overhead and any recovery partition reduce the visible space slightly more.
The exam also uses transfer-rate units. Drive and bus speeds are often given in Gbps (gigabits per second), while file transfer speeds appear in MB/s (megabytes per second). Divide Gbps by 8 to get GB/s, though protocol overhead means real throughput is lower. SATA III, for example, is rated at 6 Gbps, which is about 600 MB/s of usable throughput.
Common errors and misconceptions
- Calling storage "memory." Everyday speech says "my phone has 128 GB of memory." On the exam, memory means RAM, and storage means the drive.
- Expecting more RAM to add storage space, or more storage to fix a lack of RAM. Extra storage does not stop thrashing. Adding RAM reduces paging, and moving the page file to an SSD softens its cost.
- Treating an unformatted drive as a failed drive. Check the partition and file system before replacing hardware.
- Assuming persistent means safe. Persistent data survives power loss but not drive failure, deletion, malware, or theft. The final chapters on RAID return to this point.
What comes next
The next chapters examine the devices themselves. HDDs store data magnetically on spinning platters. SSDs store it in NAND flash with no moving parts. Both attach through interfaces such as SATA or NVMe, in form factors such as 2.5-inch or M.2. After those, RAID shows how several drives can work together for speed or redundancy.
Exercise
A technician powers on a desktop and sees "Operating system not found." The drive appears in the firmware setup screen. Name two storage-related causes to check, and say which part of the boot sequence failed.
Show answer
The firmware found the drive but could not load the OS, so the failure is at the step where the boot loader or OS is read from storage. Check (1) the boot order, in case the firmware is trying another device first, and (2) the boot record or partition, which may be damaged or missing, for example because the system partition is inactive or corrupted. The drive hardware is likely fine, since the firmware sees it.
Exercise
A new drive is sold as 2 TB. Roughly how much capacity will Windows show, in GB, before file system overhead?
Show answer
2 TB is 2 x 10^12 bytes. Dividing by 2^30 gives about 1,862.6, so Windows shows roughly 1,863 GB (strictly GiB). The drive is not defective. Decimal and binary units differ.