Linux+ Logical Volume Management (LVM) Flashcards
7 cards from real Linux practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Linux+ Logical Volume Management (LVM) flashcards as text
Which command reduces the size of a logical volume named /dev/vg0/lv_data by 5GB?
Answer: lvreduce -L -5G /dev/vg0/lv_data
lvreduce reduces the size of a logical volume, using -L with a negative value to specify the reduction amount.
What must be done before shrinking an ext4 filesystem on a logical volume?
Answer: Unmount the filesystem and run resize2fs first
The filesystem must be unmounted and resized with resize2fs before shrinking the logical volume to prevent data corruption.
Which LVM metadata backup file location is used by default for vgcfgbackup?
Answer: /etc/lvm/backup/
LVM stores volume group configuration backups in /etc/lvm/backup/ by default when vgcfgbackup is run.
A volume group has 100 extents free. What does 'lvcreate -l 50%FREE vg0 -n lv_new' create?
Answer: A logical volume using 50 extents
The %FREE suffix calculates 50% of the currently free extents (100), creating a volume using 50 extents.
Which command displays detailed information about a specific logical volume including its segments?
Answer: lvdisplay -m /dev/vg0/lv1
lvdisplay -m (or --maps) shows logical volume segment mapping details including physical extents.
What is the purpose of the 'vgscan' command?
Answer: Scans all block devices for LVM volume groups and updates the LVM cache
vgscan scans all block devices to detect volume groups and updates the LVM device cache (/run/lvm/cache/.cache).
Which option in lvcreate creates a thinly-provisioned logical volume inside a thin pool?
Answer: --virtualsize
The --virtualsize (or -V) option specifies the virtual size of a thin volume backed by a thin pool.