Exercise: Exploring Storage Devices in Linux

Using Command-Line Tools

A hands-on exercise to identify physical storage devices, their partitions, and their health status within a Fedora Linux environment.
Author

Chuck Nelson

Published

October 22, 2025

1 Purpose

This exercise provides your first hands-on experience with command-line storage tools in a Linux environment. Before you can partition or format a drive, you must be able to identify it and check its health. This exercise walks you through the fundamental commands to inspect the block devices connected to your system and check their S.M.A.R.T. health status.

2 What You’ll Accomplish

By the end of this exercise, you will be able to:

  • Use lsblk to list all block devices and their partitions.
  • Use fdisk to identify a drive’s partition table type.
  • Install software packages in Fedora using dnf.
  • Use smartctl to view detailed drive information and its overall health assessment.

This exercise maps to the following program and course learning outcomes:

  • Program Learning Outcomes (PLOs):
    • 3. Apply terminology and numeric or system concepts: You will use commands that display and require understanding of device names, partitions, and health statuses.
  • Course Learning Outcomes (CLOs):
    • 3. Troubleshoot hardware and basic network components: Identifying a drive and checking its health are the first steps in any storage troubleshooting process.

This exercise develops the following skills, which align with the O*NET SOC Code 15-1232.00 for Computer User Support Specialists.

Learning Objective O*NET KSAs Technologies Used
Identify attached storage devices in Linux. Knowledge: Computers & Electronics
Abilities: Information Ordering
lsblk, fdisk
Check the health status of a storage device. Knowledge: Computers & Electronics
Skills: Troubleshooting, Systems Analysis
smartctl, S.M.A.R.T.

3 Prerequisites

This exercise requires a running Fedora 42 virtual machine with internet access and a user account with sudo privileges.

4 Step-by-Step Guide

Open a terminal window in your Fedora VM to begin.

4.1 Step 1: Install smartmontools

While most block device tools are installed by default, the S.M.A.R.T. analysis tool is not. You will install it using the dnf package manager.

  1. Run the following command to install the package. You will be prompted for your password.

    sudo dnf install -y smartmontools

    The -y flag automatically answers “yes” to the confirmation prompt.

4.2 Step 2: List Block Devices

The lsblk command lists all attached block devices (drives) and their partitions in a tree-like format.

  1. Run the command:

    lsblk
  2. Analyze the output. You will likely see a device named vda or sda, which represents your primary virtual hard disk. You will also see its partitions listed below it (e.g., vda1, vda2).

In your student notebook, write down the name of your main storage device and list its partitions.

4.3 Step 3: Identify the Partition Table

Next, you will use fdisk to view detailed information about the drive, including its partition table type.

  1. Run fdisk with the -l (list) flag on your main storage device. You must use sudo because it requires elevated privileges.

    # Replace /dev/vda with the device name from Step 2 if different
    sudo fdisk -l /dev/vda 
  2. Look at the top of the output. You should see a line that says Disklabel type: gpt. This confirms your virtual disk is using the modern GUID Partition Table standard.

In your notebook, write down the “Disklabel type” for your main drive.

4.4 Step 4: View Drive Information with smartctl

Now, use the tool you installed to get detailed information directly from the drive’s firmware.

  1. Run the following command to show the information page for your drive:

    sudo smartctl -i /dev/vda
  2. Review the output. You can see the device model, serial number, firmware version, and more.

4.5 Step 5: Check Drive Health

This is the most critical use of smartctl: getting a simple, pass/fail health assessment.

  1. Run the following command using the -H (health) flag:

    sudo smartctl -H /dev/vda
  2. The output will be very simple. The most important line is the SMART overall-health self-assessment test result. For a healthy drive, it will say PASSED.

In your notebook, write down the result of the health assessment test.

5 Reflect and Review

ImportantReflection: 3-2-1

Now that you have completed this exercise, reflect on your experience in your Microsoft Teams Student Notebook:

  • 3 pieces of information you can find using these command-line tools.
  • 2 differences between the output of lsblk and fdisk -l.
  • 1 question you still have about S.M.A.R.T. technology.
TipCheck on Learning

Answer these questions in your notebook to solidify your understanding:

  1. What command would you use to get a quick, tree-like view of your drives and partitions?
  2. Why do you need to use sudo to run commands like fdisk and smartctl?
  3. You run a health check on a drive and the result is not PASSED. What is the most important action to take?
  4. What does the Disklabel type tell you about a drive?
Back to top