LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-03-2014, 11:28 PM   #1
NightHorse
Member
 
Registered: Jun 2009
Location: Egypt
Distribution: Ubuntu 10.04
Posts: 117

Rep: Reputation: 16
Corrupted superblocks


Hi,

I had a power problem with my laptop that was forcing many restarts, at one point the partitions were corrupted.

I tried to check the file system using 'fsck -y /dev/sda7' and I could mount the partition, unfortunately the inode table seems missing, as all the files/directories are in lost+found.

It seems all the files exist but in lost+found, I want to try to restore the directory hierarchy, so if anyone can suggest anything that would be great.

I have tried the process from here http://linuxexpresso.wordpress.com/2...ock-in-ubuntu/
but it didn't work on the partitions that I already ran fsck on, but it worked on the other ones that I didn't previously ran fsck on.

So any suggestions?
 
Old 01-04-2014, 04:07 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,387

Rep: Reputation: 581Reputation: 581Reputation: 581Reputation: 581Reputation: 581Reputation: 581
About 10 years ago I had the same problem but I only had about a dozen file fragments in lost+found. I used a hex editor to examine each file fragment in lost+found and figured out what the files were. Then I restored those files from backup. This could be practical for you if you have a small number of files in lost+found.

-------------------
Steve Stites
 
Old 01-04-2014, 05:56 PM   #3
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143
I've had this happen twice on systems under my control, but like jailbait only a few files ended up in lost+found. I used a combination of file, head/tail, etc. to figure out what the files were so I could restore them.
 
Old 01-05-2014, 03:02 PM   #4
NightHorse
Member
 
Registered: Jun 2009
Location: Egypt
Distribution: Ubuntu 10.04
Posts: 117

Original Poster
Rep: Reputation: 16
The problem is that all the partition content is in lost+found, about 450 GB of data, and there are about 150GB totally lost.

I wish I could tried the fix in the link I posted, it worked on the other partitions which I did not run fsck on, I think when you run fsck on the partition it rewrites the superblocks so you can't restore them later. I will try to look for other solutions during the weekend, if I got anything I will post here in case anyone will have the same problem. hopefully not.
 
Old 01-05-2014, 06:58 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,392

Rep: Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191
fsck is for fixing the filesystem, not necessarily the files in it.
That's one (of many) reason everyone needs good backups.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
raid superblocks errors Friis Linux - Newbie 3 10-19-2011 05:36 PM
Recovering mdadm superblocks deck- Linux - General 4 10-25-2010 08:53 PM
Superblocks - MD0 or SDA1? joneslja Linux - Newbie 1 08-11-2010 09:25 AM
[SOLVED] Where is the backup superblocks? miceagol Linux - Software 11 03-09-2010 03:54 PM
How are alternative superblocks fixed? lotuseclat79 Linux - Kernel 4 09-21-2007 11:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration