During an overnight maintenance window you plan to shrink the ext4 file system located on /dev/mapper/vgdata-lvarchive. Before reducing the size of the underlying logical volume, you need to know exactly how many file-system blocks the volume can be reduced to so that you do not make it smaller than the data it contains. The file system is currently unmounted, and you want a command that only reports this minimum size without modifying anything. Which single command satisfies this requirement?
resize2fs with the -P (print minimum) option calculates and displays the minimum number of blocks required for the current contents and then exits without altering the file system. Using -M would immediately shrink the file system to that minimum, -f merely forces a resize operation if one is attempted, and e2fsck only checks or repairs consistency-it does not report the minimum shrinkable size. Therefore the correct choice is the command that uses -P.
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 does the -P option in resize2fs do?
Open an interactive chat with Bash
How does resize2fs differ from e2fsck?
Open an interactive chat with Bash
Can you explain the difference between -P and -M options in resize2fs?
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...
IT & Cybersecurity Package Join Premium for Full Access