Take a disk through every state and record what each one looks like

short · 40 min · Objective 1.2

Task

Attach a second virtual disk to the guest and take it deliberately through uninitialised, unallocated, RAW, formatted, lettered, letterless and offline -- recording what the tool shows at each stage. Those states are exactly the symptoms of "the disk is not working", and seeing each one makes them recognisable.

Steps

  1. Add a second virtual disk and open the disk management tool without changing anything. Record the state in lab/disk/states.csv with header stage,state_shown,visible_in_explorer,what_fixes_it.
  2. Initialise it, then partition it, then format it, recording a row in lab/disk/states.csv after each step.
  3. Remove the drive letter, record the state, then reassign it. Add both rows.
  4. Take the disk offline, record the state, and bring it back online. Add both rows.
  5. Shrink the volume, record how much it offered against how much is free, and write lab/disk/shrink.md naming at least three unmovable files that can stop a shrink and the order in which you would release them.

Verify

awk -F, 'NR>1 && NF>=4 {n++} END {print n" state(s) recorded"}' lab/disk/states.csv
awk -F, 'NR>1 {print $2}' lab/disk/states.csv | sort -u | wc -l
grep -Eic 'offline' lab/disk/states.csv
grep -Ec '^[-*0-9]' lab/disk/shrink.md
grep -Eic 'page|hibern|shadow|restore' lab/disk/shrink.md

Six or more rows, at least four distinct states, the offline state recorded, and three named unmovable files. Four distinct states is the test that matters: a file with six rows all saying "Healthy" recorded the outcome rather than the stages.

Notes

The identification habit is the real lesson. Before any change, note the disk number, the size and which volume is marked System -- two identical disks are indistinguishable in the tool except by number and content.

This is an independent study companion for CompTIA A+ Core 2 220-1202 and is not produced by or endorsed by CompTIA.