LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
LinkBack Search this Thread
Old 10-11-2005, 08:26 AM   #1
luke sleeman
LQ Newbie
 
Registered: Oct 2005
Posts: 7

Rep: Reputation: 0
Exclamation All my backup files are gone from USB harddisk


Hey,
The other night I decided to install Suse 10.0, upgrading from Suse 9.2. I've borrowed a 200gig usb hard disk to use as a backup for all my files, while I formated my main drive. I pluged in the USB hard disk, and created a Reiser FS partition with YaST and then proceeded to copy all my files across.

After I had formatted and installed Suse 10, I pluged the USB drive back in, fired up konqueror and browsed to the drive via media:/ ... what do you think I saw? Nothing. Absolutely nothing. The whole drive was blank. I even tested to make sure it really was mounted and running, by creating a new empty directory.

Where are my files gone? I've got years worth of photos on there, code for clients, etc, etc.

I've tried mounting the drive manually from the prompt as well as and booting up knoppix, just incase it was a problem with Suse, all to no avail. As far as I can see the partition is there, just totally empty.

please help!

- Luke

Edit - removed 'Arghhhh' from subject. It was anoying me :-)

Last edited by luke sleeman; 10-13-2005 at 07:04 PM.
 
Old 10-11-2005, 02:59 PM   #2
mgmax
Member
 
Registered: Jul 2005
Location: Erlangen, DE
Distribution: Debian testing/unstable
Posts: 82

Rep: Reputation: 16
If its empty, its empty. If not really, you could try to open (for example) /dev/sda1 with a hex editor. and see whether its really zero.

Perhaps you copied them to a local partition only?

Max
 
Old 10-11-2005, 07:18 PM   #3
luke sleeman
LQ Newbie
 
Registered: Oct 2005
Posts: 7

Original Poster
Rep: Reputation: 0
Hey, thanks for your reply!

I didn't think to look at the actual device to find out if the files really did copy or not. However The USB drive wasn't empty when I formatted it, so unless reiserFS explicitly zeros the partition when you format, then I would presume all I would see in the actuall device is a combination of old and new files, all garbled up.

I'm pretty sure my files are in there somewhere though, because when I copied the light on the USB hard disc was flashing, so it must have been doing something.
 
Old 10-13-2005, 08:11 AM   #4
luke sleeman
LQ Newbie
 
Registered: Oct 2005
Posts: 7

Original Poster
Rep: Reputation: 0
Hey
I went through my hard disk with a hex editor and the files are definitely there. I can set parts of my source code all chopped up. Does anybody have any suggestions for how I could possibly get them back? I've found a few commercial tools that claim they could get my files back, but forking out $400 USD seems a bit steep to me.

- Luke
 
Old 10-13-2005, 08:48 AM   #5
luke sleeman
LQ Newbie
 
Registered: Oct 2005
Posts: 7

Original Poster
Rep: Reputation: 0
Ok, I just spent some time looking through the reiserfsck man page. It looks like --rebuild-tree might do what I want, but I have a few questions.

According to the man page --rebuild-tree rebuilds all your directories and files using 'leaf nodes' that it finds on the device. This certainly seems like what I want, because the files are there ... just when I mount the drive I see nothing. I ran reiserfsck --check and it reports:

Code:
No corruptions found
There are on the filesystem:
        Leaves 1
        Internal nodes 0
        Directories 3
        Other files 0
        Data block pointers 0 (0 of them are zero)
        Safe links 0
Now I would imagine that for a full 200gb disk, there should be more than one 'leaf'. When --rebuild-tree says that it will use leaf nodes it finds, does that mean it will only use the 1 leaf node reported by --check, or will it actually scan the device looking for leaf nodes?

Secondly what exactly does the --rebuild-sb option do? When would I use this option? I've googled around looking for explanation of what the superblock in reiserfs is, but I can't find anything very helpful.

- Luke
 
Old 10-13-2005, 08:58 AM   #6
duffmckagan
Senior Member
 
Registered: Feb 2005
Distribution: Cent OS 6.4
Posts: 1,163

Rep: Reputation: 47
When you copied the files across to your USB Drive for the first time, did you see your files there?

I got no experience with USB hard disks, but usually USB "Keys" have a Read-only - Read-Write Toggle switch.
Not sure if the USB Hard disk have that...but if they have, then it would give you a clue.

Otherwise, it is absolutely wierd to lose files like these I feel.
 
Old 10-13-2005, 10:18 AM   #7
mimithebrain
Member
 
Registered: Nov 2003
Location: ~
Distribution: Ubuntu 10.04
Posts: 843
Blog Entries: 1

Rep: Reputation: 30
I got a suggestion
Here is what I would do:

dd if=/dev/sda1 of=recover

and then I would open it in kwrite and fetch all the code I can.
About the pictures, you can always try to recover it bit by bit in khexedit... or something similar.

That's the best I can think of right now...
 
Old 10-13-2005, 06:34 PM   #8
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
Problem with dd'ing the drive is that you need another 200Gb to store the partition image. Perhaps if data is mainly zeros then piping the output through gzip would reduce it to a manageable size. Then you would have a backup in case you irreversibly screwed up the original drive. I'd experiment first with a smaller partition before relying on this tho'.

A pretty long shot, but there is a perl program called jpg-recover (http://www.clarity.net/~adam/recoverpix.html) which trawls through a disk image trying to find JPEG headers to recover any image files. I think it was written with corrupted flash memory cards in mind, with the simple FAT filesystem. I don't know if it will work on a reiser image.

Does fdisk report the correct partition information?
 
Old 10-13-2005, 07:02 PM   #9
luke sleeman
LQ Newbie
 
Registered: Oct 2005
Posts: 7

Original Poster
Rep: Reputation: 0
Hey
I'm going to see if I can borrow another 200gig hard drive tonight, because I don't want to be playing with reiserfsck unless I have a backup. The recoverpix program sounds good, but from when I looked through the drive in a hex editor it seems like reiserfs breaks your files up into small chunks and puts them all over the place. This is the problem with pulling out the source code in a text editor as well.

- Luke
 
Old 10-14-2005, 08:26 AM   #10
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
Sounds like the best move. Have you checked the mailing lists at www.namesys.com (the reiser home site)? There are a number of discussions about file recovery and use of reiserfsck. e.g. from Feb 2005

reiserfs3 rebuild-tree successful but no files

Site seemed to be down earlier for some reason.

Last edited by maroonbaboon; 10-14-2005 at 08:38 AM.
 
Old 10-14-2005, 08:03 PM   #11
LinuxGeek
Member
 
Registered: Jun 2002
Posts: 302

Rep: Reputation: 31
I'm not too familiar with Suse. But since you say that you found the files copied there using a hex editor, perhaps you haven't mounted your usb hard disk and have to mount it. Check to see if it's mounted properly first...
 
Old 10-17-2005, 12:03 AM   #12
luke sleeman
LQ Newbie
 
Registered: Oct 2005
Posts: 7

Original Poster
Rep: Reputation: 0
Hi

Over the weekend I managed to find a little bit of time to play with it. Unfortunately running rebild-tree didn't do anything for me. I'll try looking through the namesys newsgroups and seeing if I can find anything helpfull.

I'm pretty sure that I've mounted the drive correctly. I tried it across several distributions, even going so far as to try it on my windows box with a few reiserFS programs for windows I found

Thanks for you help!
- Luke
 
Old 10-18-2005, 07:45 PM   #13
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
Someone else with SuSE 10 got lost files to reappear by just unplugging/replugging the drive. That was a firewire drive tho'.
 
Old 10-30-2005, 06:16 AM   #14
luke sleeman
LQ Newbie
 
Registered: Oct 2005
Posts: 7

Original Poster
Rep: Reputation: 0
Hey,
Unfortunately I unpluged and pluged in the drive plenty of times and none of the files reappeared. I've given them up as lost, and there is other data on the drive now. I guess I'll never know what happened. Big thanks to eveybody that tried to help!

- Luke
 
  


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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Backup files to usb thumb - runlevel 3 scriptn00b Linux - Newbie 3 09-18-2005 03:17 PM
Is it possible to search for a string from all the files on the harddisk? Akhran Linux - Newbie 8 09-13-2005 06:09 AM
USB Harddisk enemorales Linux - General 2 07-10-2005 04:10 AM
My harddisk keeps erasing my files! VisitorQ Linux - Hardware 2 12-16-2004 04:41 PM
Samba, Fedora Core 1 and NT 4 arghhhh! sp!d3rm@n Linux - Networking 14 10-22-2004 08:58 AM


All times are GMT -5. The time now is 12:57 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration