RHCSA Exam QuestionsBrowse all questions from this exam

RHCSA Exam - Question 26


SIMULATION -

Adjust the size of the Logical Volume.

Adjust the size of the vo Logical Volume, its file system size should be 290M. Make sure that the content of this system is complete.

Note: the partition size is rarely accurate to the same size as required, so in the range 270M to 320M is acceptable.

Show Answer
Correct Answer:

To adjust the size of the logical volume to approximately 290M, follow these steps: First, unmount the logical volume using `umount /dev/vg0/vo`. Next, use the `lvresize` command to resize the logical volume by specifying the target size, e.g., `lvresize -L 290M /dev/vg0/vo`. After this, if you're dealing with an EXT4 file system, run `resize2fs /dev/vg0/vo` to resize the file system inside the logical volume. Finally, remount the logical volume using `mount /dev/vg0/vo [mount_point]`. Verify the changes using `df -hT` to ensure the logical volume size is now approximately 290M and that the volume is correctly mounted. The range of 270M to 320M is acceptable.

Discussion

5 comments
Sign in to comment
kamilzeynal7
Jul 23, 2023

rhel8 umount /dev/mapper/my_vol2-lvshare /mnt/data lvreduce -r -L 290M /dev/my_vol2/lvshare

kenkct
Sep 1, 2024

sudo su df -hT (list the volume) umount [logical volume] (unmount the logical volume) lvresize -r -L 290M [logical Volume] (-r to resize, -L to specify the size) mount -a (remount the volume) df -hT (to verify the volume)

cb52
Jul 4, 2024

lvresize -r -L 290M /dev/vo/lvshare lsblk mount -a

thulasi
Aug 21, 2023

On what filesystem

lovekiller
Feb 1, 2025

below steps tested for RHEL9 umount /mnt/data4 e2fsck -f /dev/vg01/lv01 resize2fs /dev/vg01/lv01 290M lvreduce -r -L 290M /dev/vg01/lv01 e2fsck -f /dev/vg01/lv01 mount /dev/vg01/lv01 /mnt/data4 df -h