Courseiva

EX200 Create and configure file systems Practice Question

An administrator has an XFS filesystem on a logical volume /dev/vg_data/lv_data mounted at /data. To extend the filesystem by 10GB, which sequence of commands is correct?

⚠ Common exam trap

Red Hat often tests the misconception that `resize2fs` works for all filesystem types, or that the order of operations (extend LV vs. grow filesystem) is interchangeable, leading candidates to choose options that use the wrong tool or reverse the sequence.

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

✓

lvextend -L +10G /dev/vg_data/lv_data; xfs_growfs /data

For XFS filesystems, the logical volume must be extended first with `lvextend`, then the filesystem must be grown online using `xfs_growfs` with the mount point as the argument. XFS does not support shrinking and requires this specific order; `resize2fs` is only for ext2/3/4 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.

  • ✗

    lvextend -L +10G /dev/vg_data/lv_data; resize2fs /dev/vg_data/lv_data

    Why it's wrong here

    The logical volume is extended first, which is the correct starting order, but the command fails because resize2fs only works on ext2, ext3, and ext4 filesystems. XFS does not respond to resize2fs and will return an error because the on-disk XFS superblock is incompatible with that utility. For an XFS filesystem, the filesystem must be grown with xfs_growfs after the LV expansion.

  • ✗

    xfs_growfs /data; lvextend -L +10G /dev/vg_data/lv_data

    Why it's wrong here

    This command sequence reverses the required order: xfs_growfs is executed before the logical volume has been enlarged, so the filesystem sees no additional space and makes no changes. Even if you then extend the LV with lvextend, the filesystem will remain at its original size and the extra capacity will be unavailable. In LVM, the block device must be enlarged first, and only then can the filesystem online growth utility consume the new space.

  • ✗

    resize2fs /dev/vg_data/lv_data; lvextend -L +10G /dev/vg_data/lv_data

    Why it's wrong here

    This option combines two independent errors: it calls resize2fs, which is not a valid utility for XFS filesystems, and it runs that impossible command before extending the logical volume. Even on an ext4 filesystem, resizing before extending the LV would be ineffective because the underlying device has not grown yet; with XFS the command is outright rejected. The only valid procedure is to lvextend first, then xfs_growfs on the mounted filesystem.

  • ✓

    lvextend -L +10G /dev/vg_data/lv_data; xfs_growfs /data

    Why this is correct

    This is the correct sequence for expanding an XFS filesystem on an LVM logical volume: lvextend first allocates the additional disk space by extending the logical volume, and then xfs_growfs /data expands the filesystem to fill the newly available space. XFS can only be grown while mounted, and specifying the mount point /data tells the tool exactly which filesystem to target. Running commands in this order ensures no space is wasted and the filesystem remains consistent throughout the operation.

About these practice questions

This EX200 question is part of Courseiva's 427-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.