Check unmounted ext4 /dev/vgdata/lvdocs completely even though it is marked clean.
Interactive repair decisions are allowed.
Which command is appropriate?
e2fsck -f forces a check of ext filesystems even when their clean flag would normally allow the check to be skipped.
Detailed explanation
e2fsck -n /dev/vgdata/lvdocsIncorrect. Without -f, a clean filesystem may not be fully checked.
Incorrect. Without -f, a clean filesystem may not be fully checked.
tune2fs -l /dev/vgdata/lvdocsIncorrect. tune2fs -l displays superblock information rather than checking consistency.
Incorrect. tune2fs -l displays superblock information rather than checking consistency.
resize2fs /dev/vgdata/lvdocsIncorrect. resize2fs changes filesystem size.
Incorrect. resize2fs changes filesystem size.
e2fsck -f /dev/vgdata/lvdocsCorrect. e2fsck -f forces the ext4 check.
Correct. e2fsck -f forces the ext4 check.
Try it yourself
An example you can run in a temporary verification environment.
e2fsck -h 2>&1 | sed -n '1,12p'Expected result
-f force checking even if cleanの説明を含む使用法Key points
- e2fsck handles ext filesystems
- -f forces a check
- The target should be unmounted
Notes
- Environment: e2fsprogs e2fsck / ヘルプ表示のみ
- 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.