File Systems & Storage Management Flashcards
7 cards from real LCA practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 File Systems & Storage Management flashcards as text
Which command creates a 2 GB sparse file named 'disk.img' using dd?
Answer: dd if=/dev/zero bs=1 count=0 seek=2G of=disk.img
Using seek=2G with count=0 creates a sparse file by placing the file pointer without writing zeros, consuming no actual disk blocks.
What is the effect of running 'vgreduce vg0 /dev/sdb' without pvmove first?
Answer: Fails if /dev/sdb still holds active physical extents
vgreduce refuses to remove a PV that still contains allocated physical extents; pvmove must be run first.
Which command mounts an ISO image file as a loopback device at /mnt/iso?
Answer: mount -o loop image.iso /mnt/iso
The -o loop option tells mount to use a loop device to mount the image file as if it were a block device.
What does the XFS 'xfs_growfs' command do?
Answer: Expands a mounted XFS filesystem to fill available space on its underlying device
xfs_growfs can expand an XFS filesystem online (while mounted) to use newly added space on the underlying block device.
Which command lists all open files on a specific mount point, useful before unmounting?
Answer: lsof +D /mnt/data
lsof +D recursively lists all open files under a directory, helping identify processes preventing unmount.
In ext4, what is the purpose of the 'reserved blocks' and which command adjusts the percentage?
Answer: Blocks reserved for root to prevent full-disk lockouts; adjusted with tune2fs -m
ext4 reserves a percentage (default 5%) of blocks for the root user; tune2fs -m sets this percentage to maintain root access when the disk is nearly full.
Which command shows the physical extent layout and allocation status of a specific logical volume?
Answer: lvdisplay -m /dev/vg0/lv0
lvdisplay -m (--maps) shows the physical volume mapping for each logical extent of the LV.