SI Learning
0% read · Practice is tracked separately
← My learning
Version 1 · Chapter 21Reading mode

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.

bash
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.

bash
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.

bash
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.

bash
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.

bash
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.

bash
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.

bash
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.

bash
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

  1. Predict the result
  2. Run the guided lab
  3. Compare the output
  4. Explain your choice

A worked example

Guided lab

bash
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

Apply what you learned

Your private practice

Does resizing a partition automatically guarantee a correctly resized filesystem?

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.

All learning paths
SI CENTRALIZATION · LEARN

Linux Command Line: from first command to confident practice

24 chapters · Your own pace

0 of 24 chapters complete
Understand storage before writing to it | SI Centralization