- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud
Working with Logical Volumes
Logical Volume Management (LVM) allows block devices such as partitions and raw disks to be grouped together to provide flexible storage on a Linux host. In this hands-on lab, we cover creating physical volumes, grouping them into a volume group, creating logical volumes from the volume group, and creating and mounting file systems on the logical volumes. We also resize logical volumes, create snapshots, and restore snapshots.
Lab Info
Table of Contents
-
Challenge
Create Two Logical Volumes Based on the Information Provided in the Instructions
Once connected via ssh, elevate your privileges to root:
sudo -i- Create physical volumes out of the following partitions:
xvdf1xvdf2xvdf3xvdf4
- Create a volume group called
user_vgout of the physical volumes. - Create a logical volume named
dev_lvthat is 200 MB. - Create a logical volume named
test_lvthat is 64 extents.
-
Challenge
Create File Systems on the `dev_lv` and `test_lv` Logical Volumes
- Create an ext4 file system on
dev_lv. - Create an xfs file system on
test_lv. - Create two mount points:
/mnt/devand/mnt/test. - Add entries for
dev_lvandtest_lvto/etc/fstab. - Mount the
dev_lvandtest_lvfile systems on/mnt/devand/mnt/testrespectively.
- Create an ext4 file system on
-
Challenge
Resize the `graphics_lv` and `docs_lv` Logical Volumes
- Increase the
graphics_lvlogical volume by 50 extents. - Shrink the
docs_lvlogical volume by 100 MB.
- Increase the
-
Challenge
Perform a Snapshot of the `prod_lv` Logical Volume and Restore the `stage_snap` Snapshot to Its Origin Volume
- Create a snapshot of the
prod_lvlogical volume calledprod_snapthat has a size of 50 MB. - Restore the
stage_snapsnapshot to its origin volume. - Unmount
/mnt/staging. - Merge the
stage_snapsnapshot with its origin volume.
- Create a snapshot of the
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.