Courseiva
hardMultiple Select

XK0-006 Set up a new LVM volume Practice Question

An administrator needs to set up a new LVM volume. Which two commands are necessary in the initial setup before creating a logical volume?

⚠ Common exam trap

Test-takers frequently confuse the order of LVM commands, thinking `lvcreate` is the first step, but LVM requires a strict hierarchy: PV → VG → LV, and `pvcreate` and `vgcreate` must precede any logical volume creation.

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

✓

vgcreate

Before creating a logical volume (LV), you must first prepare the physical storage devices and then group them into a volume group. The `pvcreate` command initializes a block device (e.g., /dev/sdb) as a physical volume (PV) by writing LVM metadata to it. The `vgcreate` command then creates a volume group (VG) from one or more PVs, which serves as the pool of storage from which logical volumes are carved. Without these two steps, the LVM subsystem has no recognized storage to allocate.

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

    Why it's wrong here

    mount attaches an existing filesystem to the directory tree, which requires the logical volume to already exist and be formatted. It is tempting because mounting is the final step in provisioning storage, but the stem asks for the initial setup commands: pvcreate and vgcreate.

  • ✗

    lvcreate

    Why it's wrong here

    lvcreate allocates space within an existing volume group, so it runs after pvcreate and vgcreate have established the physical and group layers. It would be the correct command once those prerequisites exist, but not during initial setup.

  • ✓

    vgcreate

    Why this is correct

    vgcreate aggregates one or more initialised physical volumes into a volume group, the storage pool from which logical volumes are carved. It must run after pvcreate and before lvcreate, satisfying the setup sequence required before any logical volume can exist.

  • ✓

    pvcreate

    Why this is correct

    pvcreate initialises a raw block device or partition as a physical volume, writing the LVM metadata label that the volume group layer requires. Without this step, vgcreate has no recognised physical volume to aggregate, so it is a mandatory prerequisite in the LVM setup sequence.

  • ✗

    mkfs

    Why it's wrong here

    mkfs writes a filesystem onto an existing block device, so it runs after the logical volume exists, not during initial setup. It is tempting because formatting is a required step before mounting, but the stem asks for the pre-creation commands: pvcreate and vgcreate.

About these practice questions

This XK0-006 question is part of Courseiva's 781-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 XK0-006 practice question is part of Courseiva's free CompTIA 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 XK0-006 exam.