EX200 Exam QuestionsBrowse all questions from this exam

EX200 Exam - Question 79


SIMULATION -

There is a local logical volumes in your system, named with common and belong to VGSRV volume group, mount to the /common directory. The definition of size is 128 MB.

Requirement:

Extend the logical volume to 190 MB without any loss of data. The size is allowed between 160-160 MB after extending.

Show Answer
Correct Answer:

To extend the logical volume named 'common' in the VGSRV volume group, mounted to the /common directory, from 128 MB to 190 MB without any loss of data, follow these steps. First, use the command 'lvextend' to increase the size of the logical volume. Then, use 'resize2fs' to resize the filesystem to utilize the newly allocated space. The correct commands are: 'lvextend -L 190M /dev/mapper/vgsrv-common' and then 'resize2fs /dev/mapper/vgsrv-common'. The '-L 190M' option ensures the logical volume's total size becomes 190 MB. After extending the logical volume, 'resize2fs' adjusts the filesystem to fit the new size.

Discussion

5 comments
Sign in to comment
adolfoale
Jan 17, 2021

Also this option is valid: # lvextend -r -L 190M /dev/VGSRV/common

hareshrajpara
Apr 28, 2021

# lvextend -rv -L 190M /dev/VGSRV/common

sovafal192
Sep 18, 2022

###* mount the existing volume ###* if volume is ext4! mkdir /common nano /etc/fstab: /dev/mapper/vgsrv-common /common ext4 defaults 1 2 mount -a ###* Expand 128M -> 190M lvextend -L 190M /dev/mapper/vgsrv-common or lvextend -L +68M /dev/mapper/vgsrv-common after lvextend we need to run xfsgrow or resize2fs in case of ext*

helpUs
Mar 8, 2021

I don't know this answer. why 190M? definition size is 128M. so extend size 68M. plz help me. why this answer is 190M?

ArchBishop
May 23, 2021

you can either use: lvextend -r L 190M /path/to/lvm OR lvextend -r L +62M /path/to/lvm The first option specifies the exact amount that is being requested (190), while the second options is adding the difference (190-128=62) to meet the requested storage amount.

ArchBishop
May 23, 2021

Apologies, my 'L' requires a switch in front: `lvextend -r -L [...]`

PENNSHARK
Jan 11, 2024

# Extend the Logical Volume to 190 MB lvextend -r -L 190MB /dev/VGSRV/common # Create a Mount Point mkdir /mnt/common # Create a Filesystem mkfs.ext4 /dev/VGSRV/common # Update /etc/fstab echo "/dev/mapper/VGSRV-common /mnt/common ext4 defaults 0 0" >> /etc/fstab # Mount the Logical Volume mount -a # Reload systemd systemctl daemon-reload # Check the Mount mount