KNZLABS :: lab05-storage-lvm

Lab 05 — Storage: Partitions, LVM, Swap, XFS

Target: rhcsa-node1 (has scratch disks /dev/sdb and /dev/sdc) · Time: 35 minutes · Reboot required: yes

Scenario

Two raw 5 GB scratch disks are attached. Build out a real storage stack: partitions, swap, LVM, file systems, persistent mounts.

Tasks

On /dev/sdb:

  1. Create a 1 GB partition formatted as **swap**. Activate it and add it to /etc/fstab so it's used on every boot.
  2. Create a 2 GB partition formatted as **xfs**. Mount persistently at `/mnt/data1` with the option `noatime`.

On /dev/sdc (use LVM):

  1. Make all of /dev/sdc a physical volume.
  2. Create a volume group named **vg_lab** using that PV.
  3. Create a logical volume **lv_app** of size 1 GB, formatted **xfs**, mounted at `/mnt/app` with default options. Persistent.
  4. Create a second logical volume **lv_logs** of size 500 MB, formatted **ext4**, mounted at `/mnt/logs` with the `nosuid,nodev` options. Persistent.
  5. **Extend** `lv_app` to 2 GB. Resize the file system to match without unmounting.
  6. Verify all four mounts survive a reboot.

Grading

~/labs/lab05-storage-lvm/grader.sh