Forced fsck ignored

General support questions
Post Reply
linusoft
Posts: 2
Joined: 2015/03/26 20:45:16

Forced fsck ignored

Post by linusoft » 2015/03/27 08:23:39

Hello,
I have a CentOS 6.6 virtual server hosted by my ISP. When I run fsck -n /dev/vda3 (vda3 is my root partition), it shows loads of errors. These are mainly incorrect inode counts etc, which should be easily fixed by fsck. The filesystem is EXT4.
However, I cannot get fsck to run on boot up to fix these issues.

I have tried creating /forcefsck in the root. It gets deleted by the system during boot, but fsck does not run.
I have tried using shutdown -rF now, adjusting tune2fs to 1, and ading AUTOFSCK_DEF_CHECK=1 to /etc/sysconfig/autofsck. But none of these methods seem to trigger an fsck on reboot.

I have checked for evidence of fsck running by grep'ing dmesg, and I still have errors detected when I run fsck manually.
The fsck binary is located in /sbin/fsck, version:
fsck from util-linux-ng 2.17.2
e2fsck 1.41.12 (17-May-2010)


Am I missing something, or should this be working?

Thanks,

Stuart

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Forced fsck ignored

Post by TrevorH » 2015/03/27 09:08:41

1) you will always get fsck errors when running against a mounted filesystem. These can almost certainly be ignored as they are false detections.
2) fsck output doesn't appear in dmesg output

If you want to know when fsck was last run then use tune2fs -l /dev/mapper/VolGroup00-LogVol00 | grep "^Last check"
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply