Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Restoring corrupted files on ext3
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
miketigerwoods
n00b
n00b


Joined: 02 Jan 2005
Posts: 17

PostPosted: Sat Feb 11, 2006 9:05 pm    Post subject: Restoring corrupted files on ext3 Reply with quote

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
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Sat Feb 11, 2006 9:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
miketigerwoods
n00b
n00b


Joined: 02 Jan 2005
Posts: 17

PostPosted: Sun Feb 12, 2006 12:13 am    Post subject: Reply with quote

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
View user's profile Send private message
linuxtuxhellsinki
l33t
l33t


Joined: 15 Nov 2004
Posts: 700
Location: Hellsinki

PostPosted: Sun Feb 12, 2006 12:37 am    Post subject: Reply with quote

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
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Sun Feb 12, 2006 10:05 am    Post subject: Reply with quote

If there are bad blocks on the disk, you should get a replacement asap.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum