System Management

An administrator has extended the logical volumes under a mounted XFS filesystem at /data (/dev/vg0/data) and a mounted ext4 filesystem at /srv (/dev/vg0/srv). Which commands grow both filesystems without unmounting either one?

Show the answer

Correct answerA. xfs_growfs /data, then resize2fs /dev/vg0/srv

AWhy this is right: xfs_growfs grows mounted XFS by mount point, and resize2fs grows mounted ext4 online.

BWhy not this: The tools are swapped; resize2fs cannot resize XFS and xfs_growfs cannot resize ext4.

CWhy not this: Growing ext4 works while mounted, so unmounting /srv is not needed.

DWhy not this: resize2fs handles only the ext family, so it cannot grow the XFS filesystem.

xfs_growfs works only on a mounted XFS filesystem and takes the mount point. resize2fs supports online growth of a mounted ext4 filesystem. Only shrinking ext4 requires unmounting, and XFS cannot be shrunk.