RHCSA RHCSA LVM Storage Management 2 — Questions and Answers
Question 1: Which command displays detailed information about a specific logical volume, including its size and status?
- lvinfo /dev/vg0/lv0
- lvdisplay /dev/vg0/lv0 (Correct answer)
- lvscan /dev/vg0/lv0
- lvstat /dev/vg0/lv0
Correct answer: lvdisplay /dev/vg0/lv0
lvdisplay shows detailed attributes of a logical volume including size, status, and path.
Question 2: After extending a logical volume with lvextend, what must you do to make the extra space usable on an XFS filesystem?
- resize2fs /dev/vg0/lv0
- xfs_growfs /dev/vg0/lv0 (Correct answer)
- mkfs.xfs /dev/vg0/lv0
- fsck /dev/vg0/lv0
Correct answer: xfs_growfs /dev/vg0/lv0
xfs_growfs expands an XFS filesystem to fill the newly extended logical volume.
Question 3: What is the correct command to remove a logical volume named 'data' from volume group 'vg1'?
- vgremove /dev/vg1/data
- lvrm /dev/vg1/data
- lvremove /dev/vg1/data (Correct answer)
- lvdelete /dev/vg1/data
Correct answer: lvremove /dev/vg1/data
lvremove is the correct command to delete a logical volume; the LV must be unmounted first.
Question 4: Which file contains persistent LVM configuration metadata backed up automatically on changes?
- /etc/lvm/lvm.conf
- /etc/lvm/backup/ (Correct answer)
- /var/lib/lvm/
- /proc/lvm/
Correct answer: /etc/lvm/backup/
LVM automatically archives volume group metadata to /etc/lvm/backup/ after each configuration change.
Question 5: You want to create a logical volume using 100% of the free space in vg0. Which command achieves this?
- lvcreate -l 100FREE -n lv0 vg0
- lvcreate -l 100%FREE -n lv0 vg0 (Correct answer)
- lvcreate -L 100% -n lv0 vg0
- lvcreate --full -n lv0 vg0
Correct answer: lvcreate -l 100%FREE -n lv0 vg0
The -l 100%FREE syntax tells lvcreate to use all remaining free extents in the volume group.
Question 6: What does the 'pe_start' value represent in LVM physical volume metadata?
- The size of each physical extent
- The offset where the first physical extent begins on the disk (Correct answer)
- The total number of physical extents
- The UUID of the physical volume
Correct answer: The offset where the first physical extent begins on the disk
pe_start is the offset in kilobytes from the beginning of the disk where the first physical extent starts.
Question 7: Which command would you use to scan all block devices and report any LVM physical volumes found?
- pvcheck
- pvscan (Correct answer)
- pvlist
- pvfind
Correct answer: pvscan
pvscan scans all block devices in the system and reports any that contain LVM physical volume signatures.
Which command displays detailed information about a specific logical volume, including its size and status?