Virtual Hard disks and LVM - Part 1 | CentOS | Redhat Linux | RHCSA

Опубликовано: 15 Июнь 2026
на канале: Deshu Infosec!
267
1

Q2. ​F​or this task, suppose that 2x1GB virtual disks are already present on your system. Write a single bash shell script to create 2x800MB partitions on each disk using ​fdisk a​ nd then bring both partitions into LVM control with the pvcreate ​command. Create a volume group called ​vgscript ​and add both PVs to it. Create three logical volumes each of size 500MB and name them ​lvscript1​, lvscript2,​ and ​lvscript3​.

This question is a continuation of Q2. Write another bash shell script to create xfs, ext4, and vfat file system structures in each logical volume. Create mount points ​/mnt/xfs​, ​/mnt/ext4​, and ​/mnt/vfat​, and mount the file systems. Include the df ​command with –h to list the mounted file systems​.