A lightweight, offline Linux lab environment for practicing Logical Volume Management (LVM) using loop devices.
LVM Lab Builder simulates real disk environments without requiring physical hardware. It allows users to safely create, manage, and destroy LVM setups for hands-on learning and experimentation.
This project is designed for:
- RHCSA / Linux certification preparation
- Linux students and instructors
- System administrators practicing storage management
Instead of using real disks, this tool:
- Creates virtual disk images (
.img) - Attaches them as loop devices
- Builds LVM structures on top
[ Disk Image ] → [ Loop Device ] → [ PV ] → [ VG ] → [ LV ]
⚙️ Features
Automated LVM setup (PV, VG, LV) Safe testing using loop devices Interactive step-by-step execution Clean teardown (no system damage) Fully offline operation
📦 Requirements
Linux system Root privileges lvm2 installed Install dependencies:
sudo apt install lvm2 -y
-
Clone the repository git clone https://github.com/debiey/lvm-lab-builder.git cd lvm-lab-builder
-
Run setup sudo bash scripts/lvm_setup.sh
-
Cleanup lab sudo bash scripts/cleanup_lvm_lab.sh
🔍 What This Builds
2 virtual disks Physical volumes (PV) Volume group (VG) Logical volume (LV)
This tool uses loop devices and does not modify your real disks.
However, always review scripts before running with sudo.
🎯 Learning Outcomes
After using this lab, you will understand:
How LVM works (PV, VG, LV) Disk abstraction in Linux Storage layering concepts Real-world system administration workflows
🚧 Future Improvements
Challenge mode (task-based learning) Filesystem and mounting integration Automated validation checks Logging and replay functionality
👤 Author
Chioma Obiagboso Linux Instructor | System Builder | Open Source Enthusiast
📜 License
MIT License