Courseiva
Configure local storage →mediumMultiple Select

EX200 Configure local storage Practice Question

Which command can be used to create a logical volume using all available free space in a volume group?

⚠ Common exam trap

Red Hat often tests the distinction between `-l` (extents/percentage) and `-L` (fixed size) flags, and candidates mistakenly use `-L 100%FREE` thinking it works like the `-l` percentage syntax.

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

✓

lvcreate -l 100%FREE -n lvdata vgdata

The `-l 100%FREE` flag allocates all unallocated physical extents in the volume group, which is the precise way to use all available free space. Option D (`-l 100%VG`) is incorrect because it attempts to allocate 100% of the volume group's extents, including those already used by other logical volumes, causing the command to fail if any extents are already allocated. Therefore, only option B is correct.

Answer analysis

Option-by-option breakdown

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

  • ✗

    lvcreate --size 20G vgdata lvdata

    Why it's wrong here

    Beyond using --size to fix the LV at 20 GiB, this command also violates the required lvcreate argument order: the volume group name must follow the -n LV name, so the correct form would be 'lvcreate -n lvdata -L 20G vgdata'. As written, lvcreate interprets 'vgdata' as the LV name and 'lvdata' as the missing VG argument, causing a syntax error. Even if the order were swapped, --size still only allocates a fixed 20 GiB rather than using 100%FREE.

  • ✓

    lvcreate -l 100%FREE -n lvdata vgdata

    Why this is correct

    The -l flag accepts percentage-based allocation, and 100%FREE specifically targets only the unallocated physical extents in the volume group, so the resulting LV consumes all remaining free space. In contrast to a fixed-size command, this scales automatically as the VG's free space changes. It is the canonical way to create an LV spanning the full free capacity without requiring the administrator to calculate extent counts.

  • ✗

    lvcreate -L 20G -n lvdata vgdata

    Why it's wrong here

    This command creates a logical volume with a fixed capacity of exactly 20 GiB, not every available free extent, because -L specifies an absolute size rather than a percentage. Unless the volume group happens to have precisely 20 GiB of free space, the LV will not use all free space; any remaining free extents stay unallocated and are not consumed by lvdata. Moreover, a fixed size does not adapt to changes in VG free space after copy-on-write snapshots or other allocations.

  • ✗

    lvcreate -l 100%VG -n lvdata vgdata

    Why it's wrong here

    The `-l 100%VG` flag attempts to allocate 100% of the volume group's extents, including those already used by other logical volumes. If any extents are already allocated, this command will fail. It does not reliably use only free space.

  • ✗

    lvcreate -L 100%FREE -n lvdata vgdata

    Why it's wrong here

    The -L flag is intended for a literal size value such as 20G or 512M, not a percentage; passing '100%FREE' is invalid syntax and lvcreate will immediately error out with an unrecognized size specification. Percentages are only accepted by the -l flag, which counts in logical extents, whereas -L expects a human-readable byte-size unit. Therefore this command cannot create any LV.

About these practice questions

One of 427 original EX200 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.