exam questions

Exam EX200 All Questions

View all questions & answers for the EX200 exam

Exam EX200 topic 1 question 53 discussion

Actual exam question from RedHat's EX200
Question #: 53
Topic #: 1
[All EX200 Questions]

SIMULATION -
We are working on /data initially the size is 2GB. The /dev/test0/lvtestvolume is mount on /data. Now you required more space on /data but you already added all disks belong to physical volume. You saw that you have unallocated space around 5 GB on your harddisk. Increase the size of lvtestvolume by 5GB.

Show Suggested Answer Hide Answer
Suggested Answer: See explanation below.
Create a partition having size 5 GB and change the syste id '8e'. use partprobe command pvcreate /dev/hda9 Suppose your partition number is hda9. vgextend test0 /dev/hda9 vgextend command add the physical disk on volume group. lvextend -L+5120M /dev/test0/lvtestvolume verify using lvdisplay /dev/test0/lvtestvolume.

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
ArchBishop
Highly Voted 3 years, 6 months ago
They identify the LVM as mounted; which indicates that there is an associated FS. You'll wanna make sure that unmount first, and then resize the FS as well. This can easily be done by adding the additional -r switch in the command: lvextend -L +5G -r [/dev/vg/lvm] If you forget this step, you can also run resize2fs or xfs_growfs
upvoted 6 times
...
Lazylinux
Most Recent 3 months, 3 weeks ago
My take on this => i think it being misinterpreted => i believe questions is saying that there is 5G of free space on disk unpartitioned and NOT the VG or LV which is common scenario and based on this this is how i would go about it * Step 1 => create parition for the remaining space using fdisk i.e. fdisk /dev/sdd => n > primary 2 > except default -all space => type input 8e => w to save and exit * Step 2 => pvcreate /dev/sdd2 => prepare partition for LVM * Step 3 => vgextend VG_NAME /dev/sdd2 => adds the /dev/sdd2 (Partition/Block) to the existing VG where LV exists * Step 4 => your choice either lvresize or lvextend and DO NOT forget option -r to avoid doing double steps i prefer lvextend=> lvextend -l 100%FREE -r LV-NAME in this case (lvtestvolume) => this will take all available FREE space available in the VG and hence meets the requirement
upvoted 1 times
...
larsmattim
11 months, 3 weeks ago
https://access.redhat.com/solutions/24770
upvoted 1 times
...
kitkat
2 years, 5 months ago
--assume new disk is src pvcreate /dev/sdc vgextend test0 /dev/sdc vgs lvs lvextend -r -l +100%FREE /dev/test0/lvtestvolume --in above command because we are going to use 100% of 5GB disk we specified +100%FREE. Below two commands i am adding however i didn't have to use the because while using -r in above command volume is already resized and automatically fle system type is matched to that of the existing volume. xfs_growfs /dev/test0/lvtestvolume -----in case of xfs file system resize2fs /dev/test0/lvtestvolume -----in case of ext2, 3 or 4 running above command will produce following: The file system is alread ________ blocks long. Nothing to do! --run df -Th command to check size.
upvoted 4 times
kitkat
2 years, 5 months ago
Reference: https://www.redhat.com/sysadmin/resize-lvm-simple
upvoted 1 times
...
...
kysj
2 years, 9 months ago
Assume the /dev/sda is 5GB #parted -s /dev/sda mklabel gpt mkpart primary 0% 100% #parted -s /dev/sda set 1 lvm on # partprobe # vgextend test0 /dev/sda1 # lvextend -r -l 100%FREE /dev/test0/lvtestvolume For xfs file system: # xfs_growfs /data // the mount point For ext file system: # resize2fs /dev/test0/lvtestvolume // the lv path #df -h /data
upvoted 2 times
...
ANI_04
3 years, 1 month ago
$ fdisk /dev/sda # create a partition of that free 5G space # change it's type to lvm $ partprobe $ vgextent test0 /dev/sdaX $ lvextend -r -l 100%FREE -n dev/test0/lvtestvolume test0
upvoted 1 times
...
sugisho
3 years, 3 months ago
[root@station ~]# lvextend --help lvextend - Add space to a logical volume Extend an LV by a specified size. lvextend -L|--size [+]Size[m|UNIT] LV [ -l|--extents [+]Number[PERCENT] ] [ -r|--resizefs ] [ -i|--stripes Number ] [ -I|--stripesize Size[k|UNIT] ] [ --poolmetadatasize [+]Size[m|UNIT] ] [ COMMON_OPTIONS ] [ PV ... ]
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...