Courseiva
Configure local storagehardMultiple ChoiceObjective-mapped

EX200 Configure local storage Practice Question

Exhibit

Refer to the exhibit.

# lsblk -o NAME,SIZE,FSTYPE,MOUNTPOINT
NAME          SIZE FSTYPE MOUNTPOINT
sda           10G
├─sda1         1G xfs    /boot
└─sda2         9G LVM2_member
  ├─vg-lv_root 8G xfs    /
  └─vg-lv_swap 1G swap   [SWAP]
sdb            5G
└─sdb1         5G LVM2_member
  └─vg-lv_data 5G xfs    /data
sdc            2G
sdd            2G

An administrator wants to add the two 2G disks (sdc and sdd) as physical volumes, extend the 'data' logical volume in volume group 'vg' by 2G, and grow the filesystem. Which sequence of commands should be used?

⚠ Common exam trap

Many exam-takers confuse the `-L` option with and without the `+` sign, and mistakenly use `resize2fs` for XFS filesystems, or use `lvresize` instead of `lvextend` without the correct syntax for adding space.

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

pvcreate /dev/sdc /dev/sdd; vgextend vg /dev/sdc /dev/sdd; lvextend -L +2G /dev/vg/lv_data; xfs_growfs /data

It follows the correct sequence: create physical volumes on both disks, extend the volume group with both disks in a single command, extend the logical volume by exactly 2G using the `+` sign, and then grow the XFS filesystem using `xfs_growfs` with the mount point `/data`. The `+` in `lvextend -L +2G` is critical to add 2G rather than resize to 2G total, and `xfs_growfs` requires the mount point (or a block device) for XFS filesystems.

Answer analysis

Option-by-option breakdown

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

  • pvcreate /dev/sdc /dev/sdd; vgextend vg /dev/sdc /dev/sdd; lvresize -L 2G /dev/vg/lv_data; xfs_growfs /data

    Why it's wrong here

    The command lvresize -L 2G does not increase the logical volume by 2 GiB; it attempts to set the entire LV to exactly 2 GiB. If /dev/vg/lv_data is already larger than 2 GiB, this could shrink it, risking filesystem corruption, and if it is smaller, it will only extend to 2 GiB instead of adding the intended 2 GiB. To add capacity, the correct syntax is lvresize -L +2G or lvextend -L +2G. Although xfs_growfs /data is the proper final step for an XFS filesystem, the LV resize itself is fundamentally wrong.

  • pvcreate /dev/sdc /dev/sdd; vgextend vg /dev/sdc /dev/sdd; lvextend -L +2G /dev/vg/lv_data; resize2fs /dev/vg/lv_data

    Why it's wrong here

    In this sequence, the physical volume creation, volume group extension, and logical volume extension (lvextend -L +2G) are all correct, but the final resize2fs command is inappropriate. resize2fs is designed for ext2, ext3, and ext4 filesystems, not XFS; running it on an XFS filesystem will likely fail with an error indicating an unknown or unsupported filesystem type. Since /data is XFS, the online grow command must be xfs_growfs /data, which accepts the mount point and expands the filesystem to fill the newly extended LV. Using resize2fs here means the LV is bigger, but the filesystem still sees the old size.

  • pvcreate /dev/sdc /dev/sdd; vgextend vg /dev/sdc; vgextend vg /dev/sdd; lvextend -L +2G /dev/vg/lv_data; xfs_growfs /dev/vg/lv_data

    Why it's wrong here

    Executing vgextend twice (once for /dev/sdc and once for /dev/sdd) is technically valid but unnecessary, as a single vgextend vg /dev/sdc /dev/sdd accomplishes both additions in one step. The more critical flaw is the final command: xfs_growfs /dev/vg/lv_data passes a block device path, but xfs_growfs expects a mount point (e.g., /data). When given a device path, xfs_growfs will fail because it cannot resolve the device to a mounted filesystem, so the filesystem will not be grown even after the LV extension. The LV and VG steps are correct, but the XFS grow step is misused.

  • pvcreate /dev/sdc /dev/sdd; vgextend vg /dev/sdc /dev/sdd; lvextend -L +2G /dev/vg/lv_data; xfs_growfs /data

    Why this is correct

    This command chain is fully correct. pvcreate initializes both /dev/sdc and /dev/sdd as physical volumes, then vgextend adds both to volume group vg in a single command. lvextend -L +2G grows lv_data by exactly 2 GiB (the plus sign means 'add' rather than 'set to'), and xfs_growfs /data expands the XFS filesystem that is mounted at /data to consume the additional space. This is the proper order: create PVs, extend the VG, extend the LV, and finally grow the filesystem online without needing to unmount.

About these practice questions

This EX200 question is part of Courseiva's 127-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 EX200 practice question is part of Courseiva's free Red Hat 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 EX200 exam.