Courseiva
Block Devices, Filesystems and Advanced StoragemediumMultiple ChoiceObjective-mapped

LPIC-2 Practice Question: Block Devices, Filesystems and Advanced Storage

Exhibit

Refer to the exhibit.

# lsblk -o NAME,SIZE,TYPE,MOUNTPOINT
NAME   SIZE TYPE MOUNTPOINT
sda    50G disk 
├─sda1 20G part /
├─sda2  2G part [SWAP]
└─sda3 28G part /var
sdb    20G disk

An administrator wants to use /dev/sdb for a new ext4 filesystem. Which step must be performed first?

⚠ Common exam trap

Many exam-takers assume mkfs.ext4 can be run directly on a raw disk, overlooking the requirement for a partition table to be created first, which is a fundamental step in Linux disk management.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Create a partition table on /dev/sdb using fdisk.

Before creating a filesystem on a new disk, a partition table must be created to define the disk's layout. The correct answer is D because /dev/sdb represents the whole disk, and mkfs.ext4 expects a partition (e.g., /dev/sdb1) rather than the raw disk. Using fdisk to create a partition table and at least one partition is the mandatory first step.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Mount /dev/sdb to a directory using mount.

    Why it's wrong here

    Incorrect: Mounting will fail because /dev/sdb has no filesystem.

  • Create the ext4 filesystem directly on /dev/sdb using mkfs.ext4.

    Why it's wrong here

    Incorrect: While technically possible, this is not best practice and may cause issues; partitions are expected.

  • Run partprobe /dev/sdb to update the kernel partition table.

    Why it's wrong here

    Incorrect: No partition changes have been made yet, so partprobe is unnecessary.

  • Create a partition table on /dev/sdb using fdisk.

    Why this is correct

    Correct: A partition must be created first; the disk has no partition table.

About these practice questions

This LPIC-2 question is part of Courseiva's 507-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This LPIC-2 practice question is part of Courseiva's free LPI certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LPIC-2 exam.