You’ve increased the size of the /dev/battlestar/galactica LVM volume. It is mounted at /mnt/mydir; which command would you issue for OS and FS to recognize the increase?

Prepare for the Red Hat Certified Systems Admin Exam EX200. Enhance your skills with interactive quizzes, flashcards, and detailed explanations. Ace your certification exam today!

Multiple Choice

You’ve increased the size of the /dev/battlestar/galactica LVM volume. It is mounted at /mnt/mydir; which command would you issue for OS and FS to recognize the increase?

Explanation:
Growing an XFS filesystem is done while the filesystem is mounted. After you’ve enlarged the logical volume, you must resize the filesystem to use the new space. For XFS, this is done with xfs_growfs, and you pass the mount point so it can operate on the mounted filesystem. In this case, since the volume is mounted at /mnt/mydir, the command is xfs_growfs /mnt/mydir. It updates the filesystem metadata to reflect the new size and can run online without unmounting. Why the other options aren’t appropriate here: resizing an XFS filesystem with resize2fs isn’t possible because resize2fs targets ext family filesystems. vgextend would modify the volume group (adding physical volumes), not resize the filesystem. lvextend would extend the logical volume, but you’ve already increased the LV; the filesystem still needs to be grown to use that space.

Growing an XFS filesystem is done while the filesystem is mounted. After you’ve enlarged the logical volume, you must resize the filesystem to use the new space. For XFS, this is done with xfs_growfs, and you pass the mount point so it can operate on the mounted filesystem. In this case, since the volume is mounted at /mnt/mydir, the command is xfs_growfs /mnt/mydir. It updates the filesystem metadata to reflect the new size and can run online without unmounting.

Why the other options aren’t appropriate here: resizing an XFS filesystem with resize2fs isn’t possible because resize2fs targets ext family filesystems. vgextend would modify the volume group (adding physical volumes), not resize the filesystem. lvextend would extend the logical volume, but you’ve already increased the LV; the filesystem still needs to be grown to use that space.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy