Arghhhh! All my backup files are gone from USB harddisk
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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.
Edit - removed 'Arghhhh' from subject. It was anoying me :-)
Last edited by luke sleeman; 10-13-2005 at 08:04 PM.
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.
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.
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:
No corruptions found
There are on the filesystem:
Internal nodes 0
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.
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?
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.
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...
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
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!