RHCSA RHCSA LVM Storage Management 4 — Questions and Answers
Question 1: When using lvextend with the '-r' flag, what additional action does it perform automatically?
- Reboots the system to apply changes
- Resizes the filesystem on the LV (Correct answer)
- Remounts the filesystem read-write
- Runs fsck on the filesystem
Correct answer: Resizes the filesystem on the LV
The -r (--resizefs) flag causes lvextend to automatically resize the filesystem after extending the LV.
Question 2: Which LVM configuration file is the primary source for system-wide LVM settings such as filter rules for devices?
- /etc/lvm/lvm.conf (Correct answer)
- /etc/lvm/lvmlocal.conf
- /etc/sysconfig/lvm
- /proc/sys/dev/lvm
Correct answer: /etc/lvm/lvm.conf
/etc/lvm/lvm.conf is the main LVM configuration file controlling filters, logging, and global settings.
Question 3: A logical volume is inactive. Which command activates it so it can be mounted?
- lvstart /dev/vg0/lv0
- lvchange -ay /dev/vg0/lv0 (Correct answer)
- lvactivate /dev/vg0/lv0
- vgchange -ay /dev/vg0/lv0
Correct answer: lvchange -ay /dev/vg0/lv0
lvchange -ay activates a specific logical volume, making its device node available for mounting.
Question 4: What happens to a snapshot LV when it reaches 100% usage of its allocated space?
- It automatically expands using free VG extents
- It becomes invalid and can no longer be used (Correct answer)
- It overwrites the oldest data
- It pauses writes to the origin LV
Correct answer: It becomes invalid and can no longer be used
When a snapshot runs out of space, it becomes invalid and cannot be used for recovery or mounting.
Question 5: Which pvdisplay field shows how many physical extents on a PV are currently allocated to logical volumes?
- PE Size
- Total PE
- Allocated PE (Correct answer)
- Free PE
Correct answer: Allocated PE
The 'Allocated PE' field shows how many physical extents are currently in use by logical volumes.
Question 6: You want to create a striped logical volume across /dev/sdb and /dev/sdc with 2 stripes. Which command is correct?
- lvcreate -L 10G -n lv_stripe -i 2 vg0
- lvcreate -L 10G -n lv_stripe --stripes 2 vg0
- lvcreate -L 10G -n lv_stripe -i 2 /dev/sdb /dev/sdc vg0 (Correct answer)
- lvcreate -L 10G -n lv_stripe -s 2 vg0
Correct answer: lvcreate -L 10G -n lv_stripe -i 2 /dev/sdb /dev/sdc vg0
Use -i to specify stripe count and list the specific PVs to stripe across at the end of the command.
Question 7: Which command exports a volume group so it can be imported on another system?
- vgbackup vg0
- vgexport vg0 (Correct answer)
- vgdetach vg0
- vgtransfer vg0
Correct answer: vgexport vg0
vgexport marks a VG as exported and prevents it from being activated, allowing its disks to be moved to another system.
When using lvextend with the '-r' flag, what additional action does it perform automatically?