Inspect the superblock of the XFS partition /dev/sdb1 at a low level.
Start xfs_db read-only and run commands that print the relevant information.
Which command is appropriate?
xfs_db -r opens XFS internals read-only. Multiple interactive commands can be supplied with -c.
Detailed explanation
xfs_db -x /dev/sdb1Incorrect. -x can enable expert or write access and is not the read-only choice.
Incorrect. -x can enable expert or write access and is not the read-only choice.
xfs_db -r -c sb -c print /dev/sdb1Correct. xfs_db -r with -c commands inspects the superblock without modifying it.
Correct. xfs_db -r with -c commands inspects the superblock without modifying it.
xfs_repair -L /dev/sdb1Incorrect. xfs_repair -L is a destructive last-resort repair option.
Incorrect. xfs_repair -L is a destructive last-resort repair option.
xfs_fsr -r /dev/sdb1Incorrect. xfs_fsr reorganizes file extents rather than inspecting the superblock.
Incorrect. xfs_fsr reorganizes file extents rather than inspecting the superblock.
Try it yourself
An example you can run in a temporary verification environment.
xfs_db -VExpected result
xfs_dbのバージョン。実デバイスは開かないKey points
- -r means read-only
- -c runs an xfs_db command
- -x may enable write access
Notes
- Environment: xfsprogs 6.x公式仕様
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.