How to perform full check of ext4 file system structure?
As mentioned by Satō Katsura, run e2fsck
in "force" mode:
e2fsck -f /dev/sda2
This will force a check even if the system thinks the file system is clean. The "verbose" option is helpful too:
e2fsck -vf /dev/sda2
As a side-note, and not applicable in your case, but if you use LVM for your storage you can use the neat little lvcheck
tool to run an "offline" file system check on a mounted file system (it uses an LVM snapshot and updates the file system metadata if the check doesn't find any errors).
Also, you could add the -y
flag to avoid answering questions.
From the manual:
-y
assume an answer ofyes
to all questions; allowse2fsck
to be used non-interactively.
So extending the answer (since I cannot comment yet) from @Sato - you could run:
e2fsck -vfy /dev/sda2
sudo touch /forcefsck
sudo reboot