2

On login to EC2 (Ubuntu) instance, I see

*** /dev/xvda1 should be checked for errors ***

I can't fsck /dev/xvda1 because it is mounted, and sudo umount /dev/xvda1 fails because it is in use. So I tried to use sudo touch /forcefsck as suggested here but it doesn't work, when I did it nothing happened on terminal. What to do?

3
  • Did you actually reboot the instance after performing the touch command? The command by itself just makes a file, but you have to reboot the server for the actual check to take place.
    – zymhan
    Jan 20, 2015 at 19:13
  • @WildVelociraptor I had reboot the instance but nothing happened...I don't know why, but after few hours without did anything, the message is not more displayed
    – dr house
    Jan 20, 2015 at 22:54
  • If it says that it should be checked for errors, there may be actual errors on it. Make (have) backups.
    – Halfgaar
    Jan 20, 2015 at 22:56

2 Answers 2

4

as alternative to touch /forcefsck, one can attach dirty volume to another instance, run fsck on that dirty volume and reattach it back to original instance.

2

Simply edit the file /etc/default/rcS

Uncomment and set FSCKFIX=yes

/etc/default/rcS
# automatically repair filesystems with inconsistencies during boot
FSCKFIX=yes

and reboot!

Do remember to put it back afterwards.

Not the answer you're looking for? Browse other questions tagged .