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...
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 .