Understand storage before writing to it
By the end: Distinguish a device, partition, filesystem, and mount point, and identify operations that can destroy data.
The idea
A disk may contain partitions; a partition can hold a filesystem; a mount attaches that filesystem to a directory. Inspection is different from formatting or repair. Device names can change between boots. Destructive storage practice belongs in a disposable VM with a separately identified practice disk and a recovery plan, not on your laptop's live system disk.
Your command toolkit
lsblk
What it solves: Map devices to filesystems and mount points.
lsblk -o NAME,TYPE,SIZE,FSTYPE,MOUNTPOINTS
Explicit columns make the map easier to compare. Some older versions support MOUNTPOINT rather than MOUNTPOINTS.
mount
What it solves: Inspect mounted filesystems.
mount
With no arguments it lists mounts. Attaching a new filesystem is a separate action that can obscure files already beneath its mount point.
fdisk
What it solves: Understand a partition-table editor.
fdisk --help
Interactive writes can change disk layout. Identify the intended device by more than a short /dev name before a real operation.
parted
What it solves: Understand partition management.
parted --help
Some operations take effect immediately. Resizing a partition is not the same as safely resizing the filesystem inside it.
cfdisk
What it solves: Recognize a visual partition editor.
cfdisk --help
A friendly menu still controls real partition metadata. Do not use an unfamiliar device just to explore the interface.
badblocks
What it solves: Understand block testing modes.
man badblocks
Write-mode tests destroy existing data, and even read tests can stress a failing drive. Preserve recoverable data and consult device-specific diagnostics first.
fsck
What it solves: Preview filesystem-check dispatch.
fsck -N
On util-linux, -N prints what would be done without executing checks. Actual repair requires filesystem-specific guidance and an appropriate unmounted state.
mkfs
What it solves: Understand filesystem creation.
mkfs --help
Creating a filesystem replaces important on-disk structures. This help-only example intentionally has no device argument.
Before you move on
Try the guided lab below. Compare the result with the explanation, then record your reasoning in the workbook. A missing optional program or a restricted environment is something to explain, not a reason to change system settings blindly.
Practice with evidence
- Predict the result
- Run the guided lab
- Compare the output
- Explain your choice
A worked example
Guided lab
lsblk -o NAME,TYPE,SIZE,FSTYPE,MOUNTPOINTS
df -h .
mount
What to expect: A read-only device map and mount information. Containers may expose only a limited or unusual view of the host's storage.
Make it yours: Describe the chain device → partition → filesystem → mount point. Name three facts you would verify before formatting a disposable practice disk.
Read further
- util-linux project and manuals ↗github.com
Apply what you learned
Your private practice
Answers are private. Completion requires the correct knowledge-check answer and a written response when an activity is included.
Restore a downloaded workbook
Choose a recovery file for this course and version. Review the recovered copy before saving it to your account.
Ask a question or report a problem
Describe what needs attention. Your private answer is shared only if you select the option below.