Personal computing discussed

Moderators: renee, SecretSquirrel, notfred

 
Usacomp2k3
Gerbil God
Topic Author
Posts: 23043
Joined: Thu Apr 01, 2004 4:53 pm
Location: Orlando, FL
Contact:

hard drive recovery

Tue Oct 16, 2007 12:53 pm

So the old hard drive in my server died, but I'd like to try to recover some of the data that is on there, especially thy mysql database. Fortunately most of my real data was stored on the new drive which was mounted as a separate folder, but it's some of the system data that would be helpful.

The drive is a 40gb Maxtor Fireball 3, originally Apple branded (I'm pretty sure that's why it died :wink:). It had the /swap and the system drive, which was ext2 formatted.

So yeah, any recommendations for recovery tools that can read ext2?
 
computron9000
Minister of Gerbil Affairs
Posts: 2420
Joined: Sun Oct 16, 2005 7:21 pm

Tue Oct 16, 2007 1:07 pm

What do you mean by "died"?
 
Usacomp2k3
Gerbil God
Topic Author
Posts: 23043
Joined: Thu Apr 01, 2004 4:53 pm
Location: Orlando, FL
Contact:

Tue Oct 16, 2007 1:14 pm

computron9000 wrote:
What do you mean by "died"?

Some random clicky. Filesystem is busted as Ubuntu liveCD can tell what size it is, but can't read any partitions.
 
gerbilspy
Graphmaster Gerbil
Posts: 1014
Joined: Mon Aug 05, 2002 5:38 pm
Location: Southern Illinois

Tue Oct 16, 2007 1:28 pm

I've read that Spinrite works well...haven't had to use it yet, though! :)

http://www.grc.com/sroverview.htm
Not retired anymore
 
Usacomp2k3
Gerbil God
Topic Author
Posts: 23043
Joined: Thu Apr 01, 2004 4:53 pm
Location: Orlando, FL
Contact:

Tue Oct 16, 2007 1:39 pm

Actually just got a copy of Spinrite burned and am going to try it now. Good timing :lol:
 
gerbilspy
Graphmaster Gerbil
Posts: 1014
Joined: Mon Aug 05, 2002 5:38 pm
Location: Southern Illinois

Tue Oct 16, 2007 2:45 pm

Usacomp2k3 wrote:
Actually just got a copy of Spinrite burned and am going to try it now. Good timing :lol:


:) I would LOVE to know if you think it's worth buying...I've been thinking about getting it "just in case"...since several of my drives are getting kind of old. Please let us know your opinion of it!
Not retired anymore
 
Usacomp2k3
Gerbil God
Topic Author
Posts: 23043
Joined: Thu Apr 01, 2004 4:53 pm
Location: Orlando, FL
Contact:

Tue Oct 16, 2007 3:06 pm

Well my opinion is that it's not worth it. I couldn't find any functionality to offload the data onto another drive. It just fixes files/partitons It seems to be recovery for soft-errors only, as opposed to failing drives. So doesn't help in my case.

Currently using gddrescue on the Ubuntu liveCD.
 
gerbilspy
Graphmaster Gerbil
Posts: 1014
Joined: Mon Aug 05, 2002 5:38 pm
Location: Southern Illinois

Tue Oct 16, 2007 3:10 pm

Usacomp2k3 wrote:
Well my opinion is that it's not worth it. I couldn't find any functionality to offload the data onto another drive. It just fixes files/partitons It seems to be recovery for soft-errors only, as opposed to failing drives. So doesn't help in my case.

Currently using gddrescue on the Ubuntu liveCD.


Thanks for the input. I'll save my $
Not retired anymore
 
Usacomp2k3
Gerbil God
Topic Author
Posts: 23043
Joined: Thu Apr 01, 2004 4:53 pm
Location: Orlando, FL
Contact:

Tue Oct 16, 2007 3:14 pm

So ddrescue seems to be working. For future reference, just throw in a live cd and do:
"sudo apt-get install gddrescue"
Then in order to do the backup, given /dev/sdb1 being a bad drive and /dev/sda1 being a good drive, you do this:
"sudo ddrescue /dev/sdb1 /dev/sda1"

At least that's what I did. I'll check back tomorrow and see if it worked.
 
Usacomp2k3
Gerbil God
Topic Author
Posts: 23043
Joined: Thu Apr 01, 2004 4:53 pm
Location: Orlando, FL
Contact:

Tue Oct 16, 2007 9:37 pm

And now begins the slow process of trying to get my server back into the state that it was in *sigh*
 
Usacomp2k3
Gerbil God
Topic Author
Posts: 23043
Joined: Thu Apr 01, 2004 4:53 pm
Location: Orlando, FL
Contact:

Wed Oct 17, 2007 12:24 am

Well have almost everything back to normal! Woohoo. Still need to figure out some permission stuff due to me taking people's advice and not just always logging in as root.
 
gerbilspy
Graphmaster Gerbil
Posts: 1014
Joined: Mon Aug 05, 2002 5:38 pm
Location: Southern Illinois

Wed Oct 17, 2007 7:43 am

Usacomp2k3 wrote:
So ddrescue seems to be working. For future reference, just throw in a live cd and do:
"sudo apt-get install gddrescue"
Then in order to do the backup, given /dev/sdb1 being a bad drive and /dev/sda1 being a good drive, you do this:
"sudo ddrescue /dev/sdb1 /dev/sda1"

At least that's what I did. I'll check back tomorrow and see if it worked.


I guess this is a dumb question, but could I use this technique on a Windows machine? A friend just called me and I now have a data recovery mission! :(
Not retired anymore
 
zgirl
Grand Gerbil Poohbah
Posts: 3998
Joined: Tue Jan 01, 2002 7:00 pm
Location: The dark side of the moon
Contact:

Wed Oct 17, 2007 8:42 am

gerbilspy wrote:
Usacomp2k3 wrote:
So ddrescue seems to be working. For future reference, just throw in a live cd and do:
"sudo apt-get install gddrescue"
Then in order to do the backup, given /dev/sdb1 being a bad drive and /dev/sda1 being a good drive, you do this:
"sudo ddrescue /dev/sdb1 /dev/sda1"

At least that's what I did. I'll check back tomorrow and see if it worked.


I guess this is a dumb question, but could I use this technique on a Windows machine? A friend just called me and I now have a data recovery mission! :(


You could look for a copy of XPE, which is an embedded verision of XP. Boots from the CD and loads the OS from there. Can't promise it can read y our disk, but I have used it in the past to get data off fubar'd OS drives. Then reformat.
"I used to think the brain was the most amazing organ in the entire body. Then I realized who was telling me this."
If ignorance were painful, half the posters here would be on morphine drips.
 
Usacomp2k3
Gerbil God
Topic Author
Posts: 23043
Joined: Thu Apr 01, 2004 4:53 pm
Location: Orlando, FL
Contact:

Wed Oct 17, 2007 9:34 am

So any hints on where mysql stores it's data? I'm going back in to work to see what was recovered later today, but I'd like to be able to see right away whether the most important thing was recovered, that is, the database.
 
king_kilr
Maximum Gerbil
Posts: 4300
Joined: Sat Sep 25, 2004 11:23 pm
Location: Browsing the web far and wide.
Contact:

Wed Oct 17, 2007 9:54 am

On ubuntu it looks like it is at /var/lib/mysql/
Damn the torpedoes , full speed ahead.

AMD X2 4200+, Asus A8N-E, 3GBs of RAM, 7900GS
 
Usacomp2k3
Gerbil God
Topic Author
Posts: 23043
Joined: Thu Apr 01, 2004 4:53 pm
Location: Orlando, FL
Contact:

Wed Oct 17, 2007 2:30 pm

Well the recovery crapped out due to running out of space (40gb -> 40gb...not quite sure how it ran out), but it looks like most of my files are there.

Unfortunately the whole /etc directory is missing, and there's no mysql directory in /var/lib, only a mysql-cluster which is empty. Hmm

Now to figure out how to open the dd'd .img file in windows so that I can copy the data off (since linux won't write to ntfs).
 
bitvector
Grand Gerbil Poohbah
Posts: 3293
Joined: Wed Jun 22, 2005 4:39 pm
Location: San Francisco, CA

Wed Oct 17, 2007 2:33 pm

Usacomp2k3 wrote:
(since linux won't write to ntfs).

Sure it will. It has for a long time now. apt-get install ntfs-3g (or ntfs-config, for a graphical configuration). You might need to enable universe repositories if they aren't already enabled.
 
ssidbroadcast
Graphmaster Gerbil
Posts: 1400
Joined: Sun Jul 08, 2007 10:42 pm
Location: Seattle, WA
Contact:

Wed Oct 17, 2007 3:13 pm

I saw a thread a while back about recovering data from a hard drive by freezing it. Apparently there's a right way and a… wrong way to do it. A very wrong way to do it.

I tried the forum search but when I pressed "Search" nothing happened. Anyone got that thread link?
2014 21" iMac w Intel Iris Pro
 
Ragnar Dan
Gerbil Elder
Posts: 5380
Joined: Sun Jan 20, 2002 7:00 pm

Wed Oct 17, 2007 5:22 pm

bitvector wrote:
Usacomp2k3 wrote:
(since linux won't write to ntfs).

Sure it will. It has for a long time now. apt-get install ntfs-3g (or ntfs-config, for a graphical configuration). You might need to enable universe repositories if they aren't already enabled.

How about mounting NTFS drives in a Linux VM? I checked fdisk and couldn't find any other devices but the one set up when I first installed VMWare. I also couldn't find ntfs-config when trying to apt-get it. But that means nothing until I can figure out how to make my VM read my drives... anyone know if it's possible?
 
bitvector
Grand Gerbil Poohbah
Posts: 3293
Joined: Wed Jun 22, 2005 4:39 pm
Location: San Francisco, CA

Wed Oct 17, 2007 5:54 pm

Ragnar Dan wrote:
How about mounting NTFS drives in a Linux VM? I checked fdisk and couldn't find any other devices but the one set up when I first installed VMWare. I also couldn't find ntfs-config when trying to apt-get it. But that means nothing until I can figure out how to make my VM read my drives... anyone know if it's possible?

Host drives or partitions? Note that you can't (shouldn't) mount a filesystem within a VM that is simultaneously mounted by another OS (it's a surefire way to get metadata and data corruption). Now with that caveat in mind, just using a host partition or drive directly within a guest depends on the VM, but you can generally expose host physical drives and partitions directly to the virtual machine through the VM config. VMware lets you do that. The fact that the partition is NTFS doesn't have any bearing on the situation. Any FS that the guest can mount will work as long as you properly "expose" it to the VM.
 
Ragnar Dan
Gerbil Elder
Posts: 5380
Joined: Sun Jan 20, 2002 7:00 pm

Wed Oct 17, 2007 7:40 pm

It must be possible only on the versions they sell, not the free one(s). I tried looking for ways to add other drives months back when I first installed VMWare, and that's how it seems to be. The "Add" button is grayed out in what looks like the place where I'd add them (VM->Settings, Hardware tab, and on the list, Hard Disk).

I was thinking there was a way to mount something read-only, but I didn't see that option and since reading NTFS from Linux is new to me, I'm definitely not interested in doing anything dangerous.

Thanks for the reply.
 
bitvector
Grand Gerbil Poohbah
Posts: 3293
Joined: Wed Jun 22, 2005 4:39 pm
Location: San Francisco, CA

Wed Oct 17, 2007 9:40 pm

You can do it by manually editing the vmx file, but I don't know the syntax for specifying Windows physical disks. I do know you set the ideX:X.deviceType = "rawDisk" (or scsiX:X.deviceType).

I'm not sure if you're just trying to share files, but if so, you could enable file sharing on the Windows host and use Samba in Linux to access it. Alternately, you could run an ssh server in the Linux guest and use psftp (Putty's sftp) from Windows to get and put files.
 
Usacomp2k3
Gerbil God
Topic Author
Posts: 23043
Joined: Thu Apr 01, 2004 4:53 pm
Location: Orlando, FL
Contact:

Thu Oct 18, 2007 11:00 am

Well darn. Due to the lack of the /etc folder I decided to try to re-recover.
I unmounted the 250gb drive in the server, and then set it to resize down to leave 50gb free, which I then had it make a new ext2 partition out of that. I hit the apply button, and it seems to be working, but was taking awhile, so I just left it overnight. Got up this morning and it still says that it's resizing the 250gb partition. Uh-oh. That can't be good, can it? I hit the cancel button and it popped up a note saying that cancelling would bring about the end of the world, so I told it to go back and resume.

So now I'm scared to cancel it and don't want to lose the data on that drive. Any suggestions?

EDIT: ssh'ing into it from work delivers this:
Image
So it's still running, but it shouldn't take 12 hours, should it?
Last edited by Usacomp2k3 on Thu Oct 18, 2007 12:26 pm, edited 1 time in total.
 
Usacomp2k3
Gerbil God
Topic Author
Posts: 23043
Joined: Thu Apr 01, 2004 4:53 pm
Location: Orlando, FL
Contact:

Thu Oct 18, 2007 12:25 pm

Well I went ahead and restarted the computer remotely and everything seems to be working *crosses fingers*
I'll try the restore again when I get home. I got a nifty liveCD called Parted Magic that actually includes dd_rescue, so hopefully that'll help too 8)
 
Usacomp2k3
Gerbil God
Topic Author
Posts: 23043
Joined: Thu Apr 01, 2004 4:53 pm
Location: Orlando, FL
Contact:

Thu Oct 18, 2007 11:40 pm

**** -pcfx /dev/hdc1
is my friend.

For some reason gparted shows it as a single full 232gb partition now, even though it should have 55gb of free space. That's fishy. Hence why I'm running ****.
Last edited by Usacomp2k3 on Thu Oct 18, 2007 11:53 pm, edited 1 time in total.
 
bitvector
Grand Gerbil Poohbah
Posts: 3293
Joined: Wed Jun 22, 2005 4:39 pm
Location: San Francisco, CA

Thu Oct 18, 2007 11:46 pm

Usacomp2k3 wrote:
Hence why I'm running ****.

Why does the board think **** is profanity? :lol:
 
Usacomp2k3
Gerbil God
Topic Author
Posts: 23043
Joined: Thu Apr 01, 2004 4:53 pm
Location: Orlando, FL
Contact:

Fri Oct 19, 2007 1:23 am

Well darn. It's still saying that the drive only has 5.25 GiB of unused space. That's no good. The **** output did say that there was "1 large file" which I'm guessing is the culprit. Now to just find him and nail him to the wall. Hmm.

EDIT: hmm. Well I did a check via gparted (this is all still in that nifty liveCD I linked a few posts ago), and it gave the same output as running it manually, but now it shows the proper amount of free space. So now I'm resizing and creating the new partition. W00t! This could take awhile though. Good thing I have a research paper to write for tomorrow 8)
 
Ragnar Dan
Gerbil Elder
Posts: 5380
Joined: Sun Jan 20, 2002 7:00 pm

Sat Oct 20, 2007 4:16 pm

bitvector wrote:
You can do it by manually editing the vmx file, but I don't know the syntax for specifying Windows physical disks. I do know you set the ideX:X.deviceType = "rawDisk" (or scsiX:X.deviceType).

I'm not sure if you're just trying to share files, but if so, you could enable file sharing on the Windows host and use Samba in Linux to access it. Alternately, you could run an ssh server in the Linux guest and use psftp (Putty's sftp) from Windows to get and put files.

What I'd really like is if I could Copy and Paste from Windows to Linux and back. VMware makes it seem as though it might be possible, what with it having an Edit menu item with the standard features, but it doesn't work in either direction, which is rather frustrating.

I've got Samba running to read my FAHlog.txt file from the Linux SMP client, but I'll have to dig into it more to figure out how to change it to let me save files anywhere. My big problem is I keep forgetting what I just learned how to do a couple of weeks ago.
 
bitvector
Grand Gerbil Poohbah
Posts: 3293
Joined: Wed Jun 22, 2005 4:39 pm
Location: San Francisco, CA

Sat Oct 20, 2007 4:33 pm

Ragnar Dan wrote:
What I'd really like is if I could Copy and Paste from Windows to Linux and back. VMware makes it seem as though it might be possible, what with it having an Edit menu item with the standard features, but it doesn't work in either direction, which is rather frustrating.

That's exactly what VMware tools enables. You install VMware tools in the guest to get two way copy & paste. Previously, that was a perk of the pay VMware over the free version. Just last month, though, VMware unveiled an open-source version of the tools: Open VM Tools. It is too new to have official packages for Ubuntu, though. Debian has a contrib package in experimental, which means it's too new and untested to even go into unstable, but you might try grabbing the deb source and building it if you use a Debian derivative (or just grab the official source and build). What distro & version are you running in the VM? I just built a test package of open-vm-tools for a gutsy VM and it works pretty well (it at least supports cut & paste in X as well as seamless mouse movement between VM and host); I could build one for your distro/version/architecture if it's Debian or Ubuntu.
 
Usacomp2k3
Gerbil God
Topic Author
Posts: 23043
Joined: Thu Apr 01, 2004 4:53 pm
Location: Orlando, FL
Contact:

Sun Oct 21, 2007 11:18 pm

So I have the hard drive I backed the dead one up to plugged in via an external USB device. Now how do I get linux to see it? There's no "device manager" that I can find. *scratches head*

Who is online

Users browsing this forum: No registered users and 19 guests
GZIP: On