A Linux administrator is troubleshooting a server where a secondary XFS filesystem on /dev/sdb1 is suspected to be corrupt. The filesystem was not cleanly unmounted and now fails to mount. Before attempting any repairs, the administrator needs to perform a read-only check of the filesystem to assess the damage without making any modifications. Which of the following commands should be used to accomplish this?
The correct command is xfs_repair -n /dev/sdb1. The xfs_repair utility is specifically designed to check and repair XFS filesystems. The -n option runs the command in no-modify mode, performing a read-only check without changing the filesystem, which is a crucial first step in assessing corruption. The command must be run on an unmounted filesystem, specified by its device name, such as /dev/sdb1.
xfs_repair /dev/sdb1 is incorrect because, without the -n option, it would immediately attempt to repair the filesystem, which is not what the scenario asks for. The administrator wants to check for issues first.
fsck /dev/sdb1 is incorrect because, for XFS filesystems, the fsck command is a wrapper that typically does nothing and exits, recommending the use of xfs_repair.
xfs_growfs /dev/sdb1 is incorrect as this command is used to expand or grow an existing XFS filesystem, not to check or repair it.
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 the purpose of the '-n' option in the xfs_repair command?
Open an interactive chat with Bash
Why can't the fsck command be used to check an XFS filesystem?
Open an interactive chat with Bash
How can you ensure that the xfs_repair command is safe to use on a filesystem?
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