Introduction
In this challenge, you will learn how to configure local storage by assigning physical volumes to a volume group. This is a fundamental skill for managing Logical Volume Management (LVM) on a Linux system and a common task in the RHCSA exam.
Assign Physical Volumes to a Volume Group
Logical Volume Management (LVM) provides a flexible way to manage disk space. The first step in using LVM is to initialize physical storage devices, known as Physical Volumes (PVs), and then group them into a Volume Group (VG). This challenge focuses on these initial steps.
This lab image includes one extra practice disk that the setup script partitions for you. The exact device name depends on the VM image, so inspect the available block devices and use the two prepared partitions from that extra disk.
Tasks
- Initialize the two prepared partitions on the extra practice disk as LVM physical volumes.
- Create a new volume group and add those two physical volumes to it.
Requirements
- The physical volumes must be created on the two partitions prepared on the extra practice disk.
- Depending on the VM image, those devices may appear as
/dev/vdb1and/dev/vdb2or/dev/nvme0n1p1and/dev/nvme0n1p2. - The new volume group must be named
vg_data. - Use
sudoto run commands that require root privileges.
Example
After you have successfully completed the tasks, running the sudo pvs and sudo vgs commands should produce output similar to the following. The exact sizes may vary slightly.
$ sudo pvs
PV VG Fmt Attr PSize PFree
/dev/nvme0n1p1 vg_data lvm2 a-- 1024.00m 1024.00m
/dev/nvme0n1p2 vg_data lvm2 a-- 1024.00m 1024.00m
$ sudo vgs
VG #PV #LV #SN Attr VSize VFree
vg_data 2 0 0 wz--n- 1.99g 1.99g
Your partition names may differ, but they should be the two LVM-ready partitions created on the extra practice disk.
Summary
In this challenge, you have learned how to initialize block devices as LVM physical volumes and how to aggregate them into a volume group. These are the foundational steps for implementing a flexible storage solution with LVM on a RHEL system. By completing this challenge, you have gained practical experience that is crucial for advanced storage management tasks.



