How to fix CentOS server checking file system

When CentOS server starting, this server run Asterisk Voip, it always checking file systems. Currently, i dont know how to fix it. I tried use fsck but it no running

You can see this error below
Thanks

i.imgur.com/x5tEoDq.jpg => picture link, copy + paste

Sr, i’m new guide, so i can not use picture in this post

@kelikiller
I can’t see the image, please place the image properly so that I can see the errors…

Hi

Don’t use fsck when the drives are mounted if you do fsck when the drivers are mounted then you will loose the data and also the disk will be corrupted

While rebooting the system, an fsck will be triggered which will fix the filesystem corruptions if it has any filesystem curruption.

1 Like

i.imgur.com/x5tEoDq.jpg => Link image

Sorry, because i’m a new user, i cannot post picture in the topic

Thanks for informing, we’ve given permission to post images by new user, just give a try one more time and see the image are uploading or not…

1 Like

@raghuu

I dont use fsck. This morning, i come to the office, i see this server automatic run this command, i tried restart, shutdown but not work.

@ACID01001001

Thank a lot


1 Like

@kelikiller

still you are facing the same issue

@raghuu

Yes, i dont know how to fix it. :frowning:

@kelikiller it seems like the issue with file system do one thing boot the system into rescue mode and and check the status of the file system

#dumpe2fs -h /dev/VolGroup01/LogVol00 |grep state

just tell us the state of the file system and fallow the below link for booting the system into rescue mode

Hi @kelikiller,

Your file system have error, Boot your machine in single user mode and try to clean the file system using

fsck -C -y /dev/sdx

replace the x with you root partition.

-C will continue, -y will give the yes option when it found some errors to fix.
If you need to disable the file-system check when system boots you need to edit the fstab entry

example is here.

/dev/VolGroup00/LogVol00 / ext3 defaults 1 1

the 1 will dump and other 1 will check for filesystem error. Once you make the 11 to 00 it will not check for filesystem errors.

/dev/VolGroup00/LogVol00 / ext3 defaults 0 0

But this is not recommended in any circumstance in production environments.

2 Likes

@babinlonston

Thanks for support, but when i try your command, cannot applied.

Error:
fsck -C -y /dev/VolGroup00/LogVol00 / ext3 defaults 0 0

ext3 defaults 0 0: command not support

Usage: fsck.ext3
[-panyrcdfvstDFSV]
[-b superblock]
[-B blocksize]
[-I inode_buffer_blocks]
[-P process_inode_size]
[-l | -L bad_blocks_file]
[-C fd]
[-j external_journal]
[-E extended-options] devies

@kelikiller

run #fsck -yvf /dev/VolGroup00/LogVol00

make sure you are in single user mode (or) rescue mode before running this command

when system boot up , /etc/rc.d/rc.sysinit checks for file .autofsck
if .autofsck exists, then fsck will be executed
see /etc/rc.d/rc.sysinit
do you shutdown system properly ?

Thanks everyone, i have fixed problem with command: fsck.ext3 -C -y /dev/VolGroup00/LogVol00 and repaired it. the CentOS server is running.

Thanks again for support

1 Like