coverup Posted August 6, 2003 Report Share Posted August 6, 2003 I turned off the computer before the filesystems were cleanly unmounted. Next time I turned it on, I was asked to press Y in order to force the filesystem check, but I was not quick enough - in previous versions the filesystem check was forced without my intervention. I reboot a few more times, it never asks me again to perform the check. Running e2fsck -fn /dev/hda1 shows a whole bunch of problems: Warning! /dev/hda1 is mounted. Warning: skipping journal recovery because doing a read-only filesystem check. Pass 1: Checking inodes, blocks, and sizes Deleted inode 33990 has zero dtime. Fix? no Inodes that were part of a corrupted orphan linked list found. Fix? no Inode 33991 was part of the orphaned inode list. IGNORED. Inode 33992 was part of the orphaned inode list. IGNORED. Inode 33993 was part of the orphaned inode list. IGNORED. Inode 33995 was part of the orphaned inode list. IGNORED. Inode 33996 was part of the orphaned inode list. IGNORED. Inode 111147 was part of the orphaned inode list. IGNORED. Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Inode 2 ref count is 20, should be 21. Fix? no Pass 5: Checking group summary information Block bitmap differences: -70197 -230746 Fix? no Inode bitmap differences: -(33990--33993) -(33995--33996) -111147 Fix? no Directories count wrong for group #7 (116, counted=115). Fix? no /dev/hda1: ********** WARNING: Filesystem still has errors ********** /dev/hda1: 20088/141696 files (0.5% non-contiguous), 40985/283137 blocks To be safe and avoid hand mounting/unmounting partitions, I would like to run the file system integrity check automatically, everytime after the filesystem was not properly shutdown. How do I do that? Thanks for your help... Quote Link to comment Share on other sites More sharing options...
Germ Posted August 6, 2003 Report Share Posted August 6, 2003 You should not do that. You should say "no" to fsck and let the journal recover your file system. Running ext3 and letting fsck repair a mounted file system will more than likely hose it. I've heard more than one horror story...... /germ Quote Link to comment Share on other sites More sharing options...
coverup Posted August 6, 2003 Author Report Share Posted August 6, 2003 Well, that may be how it's supposed to work. The filesystem obviously had errors despite I didn't answer anything to the prompt and let the journal to recover... By the way, to force filesystem check you need to create an empty file /forcefsck [root@localhost homedir]# touch /forcefsck then restart. The file will be deleted afterwards. Also, the script /etc/sysconfig/autofsck sets timeout and automatic fsck. I think, it is activated only if /.autofsck exists.[/i][/code] Quote Link to comment Share on other sites More sharing options...
Glitz Posted August 6, 2003 Report Share Posted August 6, 2003 I would boot the mandrake CD in rescue mode and do a complete filesystem check from there. Better yet, get Knoppix, boot it, and fix it from there. You'll probably want to check the man pages for the file check program related to the filesystem you're using. I had to fix the reiserfs filesystem on my server twice. I had to use advanced options to get it to rebuild directories and things. There is a lot more to fix on these journaling filesystems than the straight forward ext2 partitions. Good luck, Glitz. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.