cancel
Showing results for 
Search instead for 
Did you mean: 
TudorRaduta
Community Manager
Community Manager
  • 246 Views

RHCSA Practice: The LVM Creation Lab

Build LVM From Scratch

Hope you had a great weekend. Let's get our heads back in the game with a hands-on challenge that's a cornerstone of the RHCSA exam.

This is a "Mission & a Map" post, and our mission is to master the LVM creation workflow from start to finish.

The Mission

Your mission is to take a brand new, unformatted disk and make it available to the system as a usable, mounted filesystem. This tests your knowledge of partitioning, physical volumes, volume groups, logical volumes, filesystems, and persistent mounting.

The Map:

The best resources are the `man` pages for the commands you'll need. This is all you get in the exam!

  • man fdisk (or gdisk)
  • man pvcreate & man vgcreate
  • man lvcreate
  • man mkfs.xfs
  • man fstab

Your Exam Challenge:

A new 10GB disk, /dev/vdb, has been added to your system. Your task is to perform the following steps. Post the commands for each step!

  1. Partition the Disk: Create one new primary partition on /dev/vdb that uses all available space. Set the partition type to "Linux LVM".
  2. Create LVM Structure:
    • Create a Physical Volume on the new partition (/dev/vdb1).
    • Create a new Volume Group named vg_web using this Physical Volume.
    • Create a new 4GB Logical Volume named lv_html from the vg_web group.
  3. Create Filesystem: Format the new logical volume (/dev/vg_web/lv_html) with the XFS filesystem.
  4. Mount Persistently:
    • Create the directory /var/www/html.
    • Add an entry to /etc/fstab to mount the new XFS volume on /var/www/html using its UUID.
    • Mount the filesystem without rebooting.
  • Bonus Question: What two commands would you run to extend the lv_html volume to use 100% of the remaining free space in the vg_web group (and grow the filesystem)?

Let's see those command sequences!

Labels (1)
1 Reply
Chetan_Tiwary_
Community Manager
Community Manager
  • 129 Views

@TudorRaduta Thanks , excellent concept builder challenge ! One which is equally helpful in real life scenario for a sysadmin !

0 Kudos
Join the discussion
You must log in to join this conversation.