EX200 Configure local storage Practice Question
Exhibit
# parted /dev/sdc print Model: VMware Virtual disk (scsi) Disk /dev/sdc: 2147MB Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags: Number Start End Size File system Name Flags 1 1049kB 2147MB 2146MB xfs primary # mount /dev/sdc1 /mnt mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sdc1, missing codepage or helper program, or other error.
Refer to the exhibit. An administrator attempts to mount the partition but receives an error. Which command should be run first to resolve the issue?
⚠ Common exam trap
The trap here is that RHCSA candidates often jump to xfs_repair or mkfs.xfs without first checking if a filesystem exists using 'file -s'. In Red Hat Enterprise Linux, always diagnose before repairing or formatting.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
file -s /dev/sdc1
The error indicates that the partition /dev/sdc1 does not contain a recognized filesystem. Running 'file -s /dev/sdc1' displays the actual data on the partition, confirming whether a filesystem exists or if the partition is raw. This diagnostic step is essential before any repair or formatting action.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
xfs_repair /dev/sdc1
Why it's wrong here
Running xfs_repair /dev/sdc1 attempts to check and repair an existing XFS filesystem by reading its superblock and metadata. If the partition has no XFS filesystem at all (or the superblock is not valid XFS), xfs_repair will abort with errors such as 'bad magic number' or 'not an XFS filesystem', so it cannot fix the mount failure. Because the mount error already suggests a missing or unrecognized filesystem, using xfs_repair presumes the very thing that needs to be verified first. You should first inspect the device with file -s to confirm whether an actual XFS filesystem exists before attempting any repair.
- ✓
file -s /dev/sdc1
Why this is correct
The file -s /dev/sdc1 command reads the raw block device directly, bypassing the normal inode metadata, and displays the actual on-disk filesystem type (e.g., 'SGI XFS filesystem' or 'data'). This is the correct first diagnostic because the partition table entry or /etc/fstab may claim xfs, but the filesystem may have never been created or may have been overwritten. The mount error frequently occurs when there is no valid superblock, and file -s immediately reveals whether a real XFS filesystem is present or whether the partition is unformatted. This non-destructive check gives definitive evidence before any repair or mkfs action.
- ✗
partprobe /dev/sdc
Why it's wrong here
partprobe /dev/sdc forces the kernel to rescan the partition table on the disk and update the /dev/sdc1 block device representation after partition changes. This is only needed when the kernel has stale partition information, such as immediately after creating or deleting partitions, not when the partition already exists and is visible. The mount failure concerns the content of the partition (filesystem superblock), not the partition table layout. Therefore, running partprobe cannot help because it does not create a filesystem or validate the XFS superblock inside /dev/sdc1.
- ✗
mkfs.xfs /dev/sdc1
Why it's wrong here
Executing mkfs.xfs /dev/sdc1 creates a brand-new XFS filesystem, which writes a fresh superblock and metadata, irreversibly destroying any data that might be on the partition. If the partition already contains user data or a different filesystem, this action would cause catastrophic data loss, and if the mount error is due to anything other than an absent filesystem (like corrupt superblock or wrong mount options), reformatting is an unnecessarily destructive and incorrect response. The proper troubleshooting sequence is to first run file -s to determine what filesystem is actually present, then decide whether a more targeted repair like xfs_repair is appropriate, and only use mkfs.xfs as a last resort after confirming the partition is empty or data is backed up.
Visual reference
Go deeper
Related to this question
About these practice questions
This EX200 question is part of Courseiva's 127-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This EX200 practice question is part of Courseiva's free Red Hat certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the EX200 exam.