VMware Cloud Community
anatanotenshi
Contributor
Contributor

File system damaged

Greetings.

I have a server which file system is damaged, the log partition to be precise.. I'm about to use fsck to try to repair it, have you some tip for the use of this command?? link, similar problem or something, right now it tells me that it is risky to use it with a mounted file system, how do I dismount it, I tryed looking at fstab for the right device without any result...

I'll appreciate any help, don't want to reinstall it...

Thanks.

Reply
0 Kudos
6 Replies
AndreTheGiant
Immortal
Immortal

Sometime could happen that COS filesystem has some error (usual after a power-failure).

Just use fsck.ext3 -f /dev/YourPartitionName

Use this command only when error appears (fs problem during boot) or only when fs is mounted read-only.

Andre

Andrew | http://about.me/amauro | http://vinfrastructure.it/ | @Andrea_Mauro
anatanotenshi
Contributor
Contributor

Ok, that seems that will help.

I have to umount /dev/sda2 which is the partition that's damaged (/var/log is mounted there) , I commented the line at fstab and mtab, and each time I reboot mtab is recreated and the comment erased. I know that this is a partition that the console needs so that's why it's busy. But how to run fsck if it's mounted...

Any help??? I know that maybe this is a trivial question but please don't let me die alone.... I'm worried because this is the one an only time that this server has been shoot down in a wrong way and the only way I see is to make a new installation, and if that happends again (gonna change the ups) in some months this is going to be a unendless matter...

Thanks..

Reply
0 Kudos
AndreTheGiant
Immortal
Immortal

To remount in RO mode (to make then fsck) use:

mount -o remount -o ro /var/log

Or (in maintenance mode):

init 1

umount /var/log

fsck ...

reboot

Andre

Andrew | http://about.me/amauro | http://vinfrastructure.it/ | @Andrea_Mauro
Reply
0 Kudos
dickybird
Enthusiast
Enthusiast

you can take the system down to single user mode : init 1

or when you boot .. theer is option to goto maintenance mode

this should help you fix the issue by using fsck

Reply
0 Kudos
anatanotenshi
Contributor
Contributor

Thanks for your reply.

Even when I change to level one cannot umount the partition, is still busy. The problem comes 'cause the mounting point of /dev/sda2 is / root, any way, is there a way to fix it? For the nex time, is there a way to make a recovery disk??? or something in case of emergency??

Is there any way to enter in recue mode??? with some linux you type: linux rescue nomount, and the you can do what ever you want... that's at least what some web pages say...

Reply
0 Kudos
anatanotenshi
Contributor
Contributor

Ok.

Corrected. The mounting point /var/log was located in /dev/sda7 so, there wasn't trouble to correct it. Seems that OS is a little scandalous (it told me that the problem was with root too, even there was something about /bin...) and I must admit that I lost control, jaja.

Thanks...

Reply
0 Kudos