Force filesystem check on a AWS EC2 (ubuntu 14.04)
I’ve recently noticed that an Amazon EC2 VPS instance spawn the message when logging in:
*** /dev/xvda1 should be checked for errors ***
So here’s a recipie to solve the issue (as root), if you are in the same situation:
- Edit /etc/fstab and locate the line your external storage, the last digit 0 should be changed to a 1 (otherwise it will skip the check of that disk).
- Edit /etc/defaults/rcS and change the FSCKFIX=yes (and un-comment if needed)
- Create a file called /forcefsck in the root of the server.
- Reboot and wait while the server restarts and performs the check.
- If solved, revoke the changes you made to /etc/defaults/rcS and /etc/fstab
Hope it’s any help for someone out there.