Загрузка...

RHCSA Lab Q15: Create and mount LVM (using PV and VG) + use fstab for persistance

In this RHCSA practice lab, we create a logical volume using LVM, format it with ext4, and configure it to auto-mount. This task tests your knowledge of physical volumes, volume groups, logical volumes, extents, and /etc/fstab configuration.

📌 Question:

Create a volume group `wgroup` and a logical volume `wshare`.

* Physical extent size: 8 MB
* Logical volume size: 50 extents
* Format with ext4 and mount to `/mnt/wshare`
* Ensure it mounts automatically on boot

✅ Solution outline:

PV physical volumes → basic lego plates

VG volume groups → groups of basic lego plates

LV logical volumes → buildings on top of the lego plates

fdisk /dev/sda

Inside fdisk:
o → new empty DOS partition table
n → new primary partition
Partition number: 1
First sector: accept default
Last sector: +450M (leave room for swap later)
t → change type to LVM
w → write table to disk and exit

pvcreate /dev/sda1
pvdisplay

vgcreate -s 8M wgroup /dev/sda1
vgdisplay

lvcreate -l 50 --name wshare wgroup

mkfs.ext4 /dev/wgroup/wshare

mkdir -p /mnt/wshare

mount /dev/wgroup/wshare /mnt/wshare

mount | grep wshare

# edit the /etc/fstab file with a line like
UUID=53b5fe7d-137c-482f-b8a1-33e7a7f93473 /mnt/wshare ext4 defaults 0 0

(use blkid to find the correct UUID and put it there)

👉 Watch the complete RHCSA Exam Labs playlist here:
📺 https://www.youtube.com/playlist?list=PLzwsIhHG_OdZiC6ugglW4TzjIM8wrJDrt

#RHCSA #Linux #ExamPrep #LVM

Видео RHCSA Lab Q15: Create and mount LVM (using PV and VG) + use fstab for persistance канала NicoDemos
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять