View previous topic :: View next topic |
Author |
Message |
miketigerwoods n00b
Joined: 02 Jan 2005 Posts: 17
|
Posted: Sat Feb 11, 2006 9:05 pm Post subject: Restoring corrupted files on ext3 |
|
|
I run a monthly cronjob to make a stage4 backup tar.bz2 and recently the filesystem (ext3) on my server has become corrupted (/etc/make.conf was listed as 54 petabytes!) after a fsck somethings were cleaned up but some files remain corrupted. Two examples are:
Code: | drwx-w---- 2 13631696 13631696 49152 Jan 19 16:12 /etc/env.d
-rwx-w---- 1 13631696 13631696 49152 Jan 20 00:36 /etc/make.conf |
When I try and delete the files I have the following problem:
Code: | classical stage4 # rm -f /etc/make.conf
rm: cannot remove `/etc/make.conf': Operation not permitted
classical stage4 # chown root:root /etc/make.conf
chown: changing ownership of `/etc/make.conf': Operation not permitted |
Moving the files or chmod'ing them result in the same errors. I would really not like to have to reformat and restore from the almost 2 week old backup, is there any way to get these files off my disk so I can replace them with the ones from the backup? |
|
Back to top |
|
|
frostschutz Advocate
Joined: 22 Feb 2005 Posts: 2977 Location: Germany
|
Posted: Sat Feb 11, 2006 9:16 pm Post subject: |
|
|
Sounds ugly. How did it happen? Power shortage? Hardware error? Anyway, debugfs may be able to help you. You should be very careful with it, though. Better make another backup before you start messing with it. |
|
Back to top |
|
|
miketigerwoods n00b
Joined: 02 Jan 2005 Posts: 17
|
Posted: Sun Feb 12, 2006 12:13 am Post subject: |
|
|
Not exactly sure how it happened, but it sure was a pain to take my monitor off my desk (VESA mount) to go and diagnose the problem on the server. I tried debugfs and kill_file but the file remained there. Not sure how to use debugfs, I'm not that familiar with the workings of the ext2/3 filesystem and I don't want to hose the system. Guess it's time for me to build that big fileserver so I can make more frequent backups... |
|
Back to top |
|
|
linuxtuxhellsinki l33t
Joined: 15 Nov 2004 Posts: 700 Location: Hellsinki
|
Posted: Sun Feb 12, 2006 12:37 am Post subject: |
|
|
I had similar errors when there was lots of bad blocks on the disk, couldn't even delete those files _________________ 1st use 'Search' & lastly add [Solved] to
the subject of your first post in the thread. |
|
Back to top |
|
|
frostschutz Advocate
Joined: 22 Feb 2005 Posts: 2977 Location: Germany
|
Posted: Sun Feb 12, 2006 10:05 am Post subject: |
|
|
If there are bad blocks on the disk, you should get a replacement asap. |
|
Back to top |
|
|
|