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

Опубликовано: 13 Июль 2026
на канале: Deshu Infosec!
109
2

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​.
Note: I have used /mnt/lv1, /mnt/lv2, /mnt/lv3 as the mount directories.
Kindly be careful when u r doing that use /mnt/xfs, /mnt/ext4 and /mnt/vfat as the directories to mount our logical drives.