- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Core Tech
Storage & LVM Administration in Ubuntu Linux
In this lab, you will inventory attached disks with `lsblk`, `fdisk -l`, and `blkid`, partition them with `gdisk`, create ext4, XFS, and swap filesystems, configure persistent mounts in `/etc/fstab` using UUIDs, and build a Logical Volume Manager (LVM) stack from physical volumes through volume groups to logical volumes. You will finish by extending mounted storage online through LVM while the system remains running, building the practical skills needed to design, provision, and grow storage on an Ubuntu server without downtime.
Lab Info
Table of Contents
-
Challenge
Partition Disks and Create Filesystems
To start things off, you will inventory the attached storage using
lsblk,fdisk -l, andblkid, then partition the first disk with the interactivegdiskeditor to create an ext4 partition and a swap partition. You will format the new partitions withmkfs.ext4andmkswap, then verify filesystem integrity on the unmounted ext4 partition withfsck.ext4before placing it into service. -
Challenge
Mount, Unmount, and Persist Filesystems
Next, you will bring the new storage online by mounting the archive filesystem manually with
mount, inspecting it withdf -handfindmnt, and persisting the mount in/etc/fstabusing a UUID so it survives reboots. You will also activate and persist swap withswapon, verify it withswapon --showandfree -h, and stand up an on-demand tmpfs scratch area through a systemd.mountunit as a more flexible alternative to static/etc/fstabentries. -
Challenge
Manage Logical Volumes with LVM
To finish things off, you will take a quick detour through the XFS toolset with
mkfs.xfs,xfs_info, andwipefs, then build a complete LVM storage stack from the ground up. You will initialize physical volumes withpvcreate, group them withvgcreate, provision a logical volume withlvcreate, and inspect the stack with tools such aspvdisplay,vgdisplay,lvdisplay,pvs, andvgs. Finally, you will validate the design through online expansion and live data migration by extending the logical volume withlvextendandresize2fs, expanding the volume group across a second disk withvgextend, and migrating data live between disks withpvmove.
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.