Bird
0
0

A user tries to create an XFS file system with mkfs.ext4 /dev/sdh1. What is the problem?

medium📝 Debug Q7 of 15
Linux CLI - Disk and Storage
A user tries to create an XFS file system with mkfs.ext4 /dev/sdh1. What is the problem?
AThe device name is invalid
BXFS cannot be created on /dev/sdh1
CThe command creates ext4, not XFS, so the file system type is wrong
DThe command syntax is incorrect
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the command

    mkfs.ext4 formats with ext4, not XFS. To create XFS, mkfs.xfs is needed.
  2. Step 2: Check other options

    Device name is valid, XFS can be created on any partition, syntax is correct for ext4.
  3. Final Answer:

    The command creates ext4, not XFS, so the file system type is wrong -> Option C
  4. Quick Check:

    mkfs.ext4 creates ext4, not XFS [OK]
Quick Trick: Use mkfs.xfs for XFS, mkfs.ext4 for ext4 [OK]
Common Mistakes:
  • Confusing mkfs.ext4 with mkfs.xfs
  • Thinking device invalid
  • Assuming syntax error

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes