EX200 Exam QuestionsBrowse all questions from this exam

EX200 Exam - Question 59


SIMULATION -

One Logical Volume named lv1 is created under vg0. The Initial Size of that Logical Volume is 100MB. Now you required the size 500MB. Make successfully the size of that Logical Volume 500M without losing any data. As well as size should be increased online.

Show Answer
Correct Answer:

To resize a Logical Volume (LV) named lv1 under Volume Group (VG) vg0 from 100MB to 500MB without losing data and to make the change online, you follow these steps: First, verify the current size of your Logical Volume using the command 'lvdisplay /dev/vg0/lv1'. Then, use the command 'lvextend -L 500M /dev/vg0/lv1' to extend the Logical Volume size to 500MB. To apply the new size to the filesystem without unmounting it, you can use 'resize2fs /dev/vg0/lv1' if it is an ext2/ext3/ext4 filesystem. Finally, verify the new size using 'lvdisplay /dev/vg0/lv1' and 'df -h' commands to ensure the Logical Volume and the filesystem reflect the new size.

Discussion

1 comment
Sign in to comment
mattd81
May 17, 2022

lvextend -L 500M -r /dev/vg0/lv1 user the -r and you won't have to do the additional step to resize2fs