EX200 Exam QuestionsBrowse all questions from this exam

EX200 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

4 comments
Sign in to comment
kamilzeynal7
Jan 23, 2021

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

kenkct
Mar 1, 2022

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
Jan 4, 2022

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

thulasi
Feb 21, 2021

On what filesystem