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.
tune2fs -l /dev/vgdata/lvdocsIncorrect. tune2fs -l displays superblock information rather than checking consistency.
resize2fs /dev/vgdata/lvdocsIncorrect. resize2fs changes filesystem size.
e2fsck -f /dev/vgdata/lvdocsCorrect. 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 / ヘルプ表示のみ
- Prefer help or version output and a disposable device when testing storage commands.
- Formatting, repair, and mount changes can affect data or availability.
Foundation review
Place the operation
A forced check is still a maintenance operation and should target an unmounted filesystem.
Check the side effect
Use a backup and understand whether the chosen mode can repair metadata.