running automated fsck on remote server

Posted by GriffinHeart on Server Fault See other posts from Server Fault or by GriffinHeart
Published on 2010-06-14T22:31:57Z Indexed on 2010/06/14 22:43 UTC
Read the original article Hit count: 426

Filed under:
|
|

I had another question about df, and now i came to conclusion i need to run fsck my partition, i've been reading about it and would like some advice, if possible.

The situation is like this, no physical access to the server and i want to run fsck.

from what i read i just need to touch /forcefsck and when i reboot it will run fsck.

My question is, at its basis, with what arguments will the fsck run? Will it need user input to correct errors, etc?

and after running will it save a log of what happened?

if this was how it ran it would be perfect, anyway of enforcing that on reboot?

fsck -v -p /machine/disk/p1 2>&1 > fscklog.txt

Also here they describe this:

it's also a good idea on debian and debian-derivatives like ubuntu to edit /etc/default/rcS on remote servers and set "FSCKFIX=yes" that adds "-y" to the boot time fsck, so it doesn't risk the remote server being stuck waiting for someone to login at the console and run fsck.

But on Centos that doesn't seem to exist

I only have ssh access at the moment so that is why i'm being so picky with it.

here's some info about disks and mounted volumes on the server: http://pastebin.centos.org/33314

Thanks.

© Server Fault or respective owner

Related posts about filesystems

Related posts about linux-server