LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 02-11-2007, 12:25 AM   #1
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
ext3 filesystem recovery


Suppose you have a 160G SATA HDD with a 150G /dev/sda1 partiton using ext3 filesystem. There is data in the partition of say 100G. Again suppose, you ran a 'mkfs.ext2 /dev/sda1' w/o thinking twice. Is there a possibility you can recover the ext3 filesystem and then the data? Right now the /dev/sda1 shows empty with just one directory 'lost+found'. I have made a image of this disk in another bigger disk using dd - 'dd if=/dev/sda1 of=/dev/sdb1', This essentially makes a image of the sda1 in sdb1 so that I can fiddle with sdb1 and don't have to worry about harming the original data. Any suggestions as to how I can revive the old ext3 filesystem? Please donot say I needed to have a backup and now I am doomed. Because I have a backup. Still, I need to recover that filesystem. I have gone through almost all of the similar threads in LQ and searched google. Found gpart, testdisk, Linux_Recovery etc. But I haven't used any of them before. What do LQ people suggest I do? Please lets talk ways to get the data back specifically and not what I could have done and why.
Lets talk about what can I do now.
 
Old 02-11-2007, 01:31 AM   #2
St.Jimmy
Member
 
Registered: Jun 2006
Location: Boaz,Alabama
Distribution: Ubuntu 10.10 / Windows 7 Pro 64-Bit / Snow Leopard 10.6.4 64-Bit
Posts: 152

Rep: Reputation: 30
Testdisk and photorec work nicely,and as long as you didnt do a full format or dev/zero wipe it should be recoverable.another way is to buy the cd edition of acronis DD and boot from it. use it's recovery mode to recover deleted and/or quick-formated fs's. good luck
 
Old 02-12-2007, 01:36 AM   #3
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Original Poster
Rep: Reputation: 32
Thanx St.Jimmy for the response.
I have been busy lately trying to recover the lost data. so far I have used Linux_recovery and PhoenixLinux, both of which run on windows to attempt recovery and both of them failed to provide any substantial data. The Linux_recovery one did gave me back all my lost directories but with no files and the 'search for lost files' hangs with for bars in the progress menu. no luck. The PhoenixLinux didn't do any good either. It couldn't even list anything.
I am again making a image of the original hdd but this time using dd_rescue so that I get most out of the formatted disk. I plan to use Testdisk to see what it can yield. Photorec from what I have read seems like it will work but its output is rather tiresome. Says, it gives back the files in a number format like the first doc file found is 1.doc and so on. I have literally 100G of data on the disk and this means lots of files. Thinking about scouring through all the files one by one to see what file it really is seems a tiring job.
I have a similar experience in windows where I formatted a NTFS drive accidently and wiped out all my data. I used a tool called GetDataBackNTFS which worked so cooly it returned back all my data from the NTFS partition as it was. The application showed me all the deleted folders and files exactly as it was before the format and all I had to do was select the files I wanted to restore and then restore it. I wish we had a similar tool for Linux partitions too.
 
Old 02-12-2007, 03:19 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,103

Rep: Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117
Try ddrescue (no "_" character).
 
Old 02-12-2007, 03:49 AM   #5
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by syg00
Try ddrescue (no "_" character).
I am sorry but I don't see any difference. What's your point?
 
Old 02-13-2007, 04:21 PM   #6
St.Jimmy
Member
 
Registered: Jun 2006
Location: Boaz,Alabama
Distribution: Ubuntu 10.10 / Windows 7 Pro 64-Bit / Snow Leopard 10.6.4 64-Bit
Posts: 152

Rep: Reputation: 30
ddrescue is an imager, not a recovery tool like one prozac needs.
ohh, GDB is a nice tool, just needs to work with ext2/3.
 
Old 02-15-2007, 02:21 AM   #7
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Original Poster
Rep: Reputation: 32
I used photorec and it did recovered all my files. It was advised that I run photorec from the directory that will hold the recovered data and not from some other place. I used another 200G HDD and made a partition on it large enough to hold any recovered data. I have 99 directories in the recovered partition namely recurep.1 to recurep.99 likewise which contains all the files recovered. The naming of the files is very cumbersome and it is hard to get to the one file that you need but its reassuring to know that it is now there and is a now a matter of intensive searching only. hopefully, i can grep now to find out. I read SpinRite from grcdotcom can do wonders, don't know how much truth there is to it. In any case it is a commercial product.
 
Old 02-16-2007, 09:54 PM   #8
St.Jimmy
Member
 
Registered: Jun 2006
Location: Boaz,Alabama
Distribution: Ubuntu 10.10 / Windows 7 Pro 64-Bit / Snow Leopard 10.6.4 64-Bit
Posts: 152

Rep: Reputation: 30
Congratulations and good luck. Disk recovery is hard work, ain't it?
notez:Spinright only worhs on hardware damage
 
Old 02-17-2007, 10:41 PM   #9
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by St.Jimmy
Congratulations and good luck. Disk recovery is hard work, ain't it?
notez:Spinright only worhs on hardware damage
Thanks St.Jimmy. Yes its lot of hard work but its worth it.
How can a software fix a hardware damage?
 
Old 02-18-2007, 12:56 AM   #10
St.Jimmy
Member
 
Registered: Jun 2006
Location: Boaz,Alabama
Distribution: Ubuntu 10.10 / Windows 7 Pro 64-Bit / Snow Leopard 10.6.4 64-Bit
Posts: 152

Rep: Reputation: 30
It was designed to read raw data and filter badblocks, I think.
notez:welcome... glad to help someone the first time scence MSDN.. hhuuh *shudder*

Last edited by St.Jimmy; 02-18-2007 at 12:58 AM.
 
  


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
Ext3 recovery? Ynog Linux - Software 4 07-02-2010 08:38 AM
recovery in ext3 sajjadc Linux - Software 2 10-06-2006 04:25 PM
ext3 data recovery? hollywoodb Linux - General 4 03-28-2006 04:41 AM
ext3 Recovery warinthepocket Linux - General 2 12-10-2005 02:58 PM
Linux Ext3 Filesystem recovery ahpin Linux - General 1 11-27-2003 08:04 PM

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

All times are GMT -5. The time now is 05:43 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