A Linux server's /data directory, which is mounted on an XFS-formatted logical volume data_lv within the data_vg volume group, is running low on disk space. A new physical volume has been successfully added to the data_vg volume group, providing an additional 100GB of free space. Which of the following commands should the administrator run in sequence to extend the logical volume by 100GB and resize the filesystem to utilize the newly allocated space?
The correct procedure to increase the size of an LVM logical volume and the XFS filesystem it contains is to first extend the logical volume and then grow the filesystem. The lvextend -L +100G /dev/data_vg/data_lv command correctly adds 100GB to the logical volume. Following that, xfs_growfs /data is the appropriate command to expand the XFS filesystem to use the newly available space. xfs_growfs operates on the mounted filesystem, referencing its mount point.
Using resize2fs is incorrect because it is designed for ext2/ext3/ext4 filesystems, not XFS.
Attempting to grow the filesystem before extending the logical volume will fail, as the underlying block device does not yet have the additional space for the filesystem to expand into.
The vgextend command is used to add physical volumes to a volume group, a step that was already completed according to the scenario. The xfs_repair command is used to fix corrupted XFS filesystems and cannot be used to resize them.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is an XFS filesystem, and why is it commonly used?
Open an interactive chat with Bash
What is the purpose of the `lvextend` command in Linux?
Open an interactive chat with Bash
Why is `xfs_growfs` used instead of `resize2fs` for the given task?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
System Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .