Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

aramism

macrumors newbie
Original poster
Jan 19, 2015
26
2
I just recently installed all new pci-e flash/ssd hard drives to replace my disk drives. I planned on using the disk drives as backups as I have the trays in my mac pro (3,1 mac pro 8 core maxed out ram osx mavericks). So one of the drives, which has a ton of samples as well as my entire itunes library of .wavs from hundreds and hundreds of cds I use to reference audio mixing. I was in the process of copying them to a new destination drive. But in the middle I kept getting -36 errors and then all of a sudden it would either cease to be recognized at all, or all the folders would be empty. It's worth noting that the file transfers were huge, and also, the drive itself used to be me my scratch/project drive and it's been like 7 years of heavy use.



So I did some googling and downloaded a program to do the S.M.A.R.T. test and it failed (also failed in disk utility as the smart status is not verified). When I restart my computer it shows up again and all the files show up, and some of them can even be loaded such as wav files. But some seem to be corrupt randomly. Any time I try to copy files, it freezes quickly after being very very slow for like 20 minutes.



So my goal here is just to get the files off, I don't care to save the drive. Once the files are off I can just buy a new drive, which I was gonna do anyway. I just gotta get there files off. And since the drive is not fully dead (yet), I don't believe this warrants paying the super high fees of data recovery. I'm hopeful someone can guide me in the right direction.



Below I posted all the specific results in case someone is super technically fluent and it can help them solve my problem.


drivefail1.jpg drivefail2.jpg drivefail3.jpg drivefail4.jpg
 
Looks like a corrupted directory tree. That's an invisible file that lays out the structure of all your files. If it gets corrupted your data is invisible to you. I have repaired that in the past with Disk Warrior. But if you have damaged sectors on the disk then the data affected will be impossible to rescue.
 
I just didn't want to start trying to use all these programs or alternative methods of copying them (I've been using finder for now) as to not muck around with the drive any more and damage it further or wear it out more to push it to death.
 
Read http://www.gnu.org/software/ddrescue/manual/ddrescue_manual.html ...
Get a good drive the same size as the failing drive. Remove all other drives from the system.
Boot any recent Linux live cd (the Ubuntu desktop DVD is fine, and understands EFI booting). It can be put on a thumbdrive if you don't have a working DVD drive.

Run a script like:

#!/bin/bash
ddrescue -n -b512 -c256 /dev/sda /dev/sdb rescue.log
ddrescue -d -b512 -c1 --retrim /dev/sda /dev/sdb rescue.log​

The first command makes a quick pass to save as much as possible, without putting a lot of stress on the disk.

The second command works hard to recover the rest of the data, and does put stress on the disk. This command can be repeated as often as you want. (2 or 3 tries without recovering addition blocks would be the time to stop.) The blocks that couldn't be read from the source will be zeroed in the target. (The logfile is a list of the bad sectors.)

Use disk utility or other tools to repair damage to the filesystem on the target disk.

By the way, the slowness and pauses are sure signs of a seriously failing drive. Anytime a system starts have random 20 to 30 second pause check the disks!
 
When you use the disk from Finder it's a file system level access, but since the S.M.A.R.T tool reports errors these are below the file system. Also, if this was a file system error you would be able to at least check the status from Disk Utility.

Either mount the disk as read only, attempt to make a disk image or make a block level copy. Although both of these methods will carry over eventual file system errors to the new disk, but that doesn't seem to be the issue anyway. Since this is not your boot volume you should be able to attempt a repair while booted.
 
I would recommend Disk Warrior, too. But you should buy a new drive and try to avoid any write operation to the failing drive. Usually, Disk Warrior is quite good at copying orphaned files to some rescue media - hence the recommendation to buy a new disk before trying some tools to recover the data.
 
I would recommend Disk Warrior, too. But you should buy a new drive and try to avoid any write operation to the failing drive. Usually, Disk Warrior is quite good at copying orphaned files to some rescue media - hence the recommendation to buy a new disk before trying some tools to recover the data.

Two advantages to using ddrescue over filesystem-based tools:
  1. ddrescue doesn't even need the failing disk to be mounted, it copies all readable sectors to the target with "do the least damage" algorithms
  2. If you're doing a filesystem copy, then corrupted directories can "hide" undamaged files. With ddrescue, the undamaged files will be copied, and a disk rebuild/repair should find the orphaned files and recover them (perhaps in "lost" directory rather than the original directories).
 
I just want to emphasize my goal isn't to save or fix the drive. I just want to pull the data off and then trash the drive and get a new one.
 
Two advantages to using ddrescue over filesystem-based tools:
  1. ddrescue doesn't even need the failing disk to be mounted, it copies all readable sectors to the target with "do the least damage" algorithms
  2. If you're doing a filesystem copy, then corrupted directories can "hide" undamaged files. With ddrescue, the undamaged files will be copied, and a disk rebuild/repair should find the orphaned files and recover them (perhaps in "lost" directory rather than the original directories).


I kinda lost you with the whole boot it to a linux cd all that stuff. This is not my boot drive in question. Keep in mind, I understand a decent bit with computers but I am not a tech or anything so the verbiage you used was a bit confusing as was the link you directed me to. Can't I just run those commands in terminal? Can you please give me the "for dummies" version?
 
I kinda lost you with the whole boot it to a linux cd all that stuff. This is not my boot drive in question. Keep in mind, I understand a decent bit with computers but I am not a tech or anything so the verbiage you used was a bit confusing as was the link you directed me to. Can't I just run those commands in terminal? Can you please give me the "for dummies" version?

If you want to save your data, find a friend who does understand my post, and how to copy the good sectors of your disk to another drive.

The point of the "boot from live DVD" is that you don't want the failing drive to be mounted in a filesystem - get to a standalone environment and extract the good sectors with a tool that was specifically written to save failing disk drives. ddrescue is that tool... Whether it is your boot drive is irrelevant - you don't want Apple OSX to further damage the drive by trying (and re-trying) reads of bad blocks. You don't want Apple OSX running during the rescue operation.

A week ago I used ddrescue to recover a four-disk 16TB NTFS RAID-0 volume. One of the drives was behaving like your drive (errors, long pauses, super-slow) and the disk controller was dropping the whole array offline due to timeouts. Once I identified which drive was having problems, I used a similar script to copy that slice of the RAID-0 to another identical drive. ddrescue was able to save all but one 512 byte sector. I put the rescued drive back into the server, and everything came back. One photo or video on the volume has 512 bytes of zeroes instead of data - but that's a fair tradeoff for getting the other 16 TB back.
 
Last edited:
  • Like
Reactions: VAGDesign
once your drive actually reports a S.M.A.R.T. error that is legitimate , the drive is considered TOAST. you need to get whatever you can off of it, and dispose and replace the drive A.S.A.P..

there is no software utility in the world that can take drive reporting a S.M.A.R.T. error, and make that drive normal again.
disk warrior is useless on drives with s.m.a.r.t. errors.

save your money

get your drives serial #. find out what your warranty options are. your hard drive might be protected by the manufacturer's warranty or applecare, and you might be able to get your hard drive replaced for free. they won't give you your data back, but they will replace your disk drive

by legitimate i mean disk utility and something else like sea tools also reported it
 
The point of the "boot from live DVD" is that you don't want the failing drive to be mounted in a filesystem - get to a standalone environment and extract the good sectors with a tool that was specifically written to save failing disk drives. ddrescue is that tool... Whether it is your boot drive is irrelevant - you don't want Apple OSX to further damage the drive by trying (and re-trying) reads of bad blocks. You don't want Apple OSX running during the rescue operation.

Yes, but you can unmount the drive faster than you reboot the computer anyway. Once unmounted (without ejecting) the device nodes are still present, and the situation is identical to booting from a CD. So from a terminal: diskutil unmount "volume name".

aramism, you'll need to get a package manager like MacPorts or Homebrew, or compile it yourself from the source files available on the GNU ftp. You may be able to find a pre compiled version on the internet for OS X as well. I got it from the ftp a moment ago and compiled it here, it's very small and only took a few seconds to build. I can upload it here, if you trust me.. ;) But as AidenShaw said, you probably need to check with someone who can help you for this particular tool if you have no experience at all with this because the provided link actually has all the information you need.

BTW a note on the error, -36 is I/O error on Mac OS.
 
Ok so I just tried making an uncompressed disk image in disk utility (destination was a new partition on an external HDD via firewire) and after like 2 hours and it got to around 90% then it stopped and gave me an error "Unable to create “OLD HD2.dmg.” (Input/output error)". Now, like the other errors I got when trying to copy the large files via finder, the drive has disappeared from the system and I'm guessing I have to restart my computer for it to be recognized again.

I don't have any friends who would understand that either. But I will make an attempt to read it over and over. I'm hopeful maybe people can help me understand it here.

Also prior to resorting to this, should I try another process where I just copy the files? Finder doesn't work, making a disk image doesn't work. What are the other options?
 
Last edited:
Ok so on "focused brainpower mode" :) I re-read the post and found Linux and how to put it on a boot drive. But once I do boot off of it, where do I actually type the commands? I've never used Linux before so it's a full blown OS. Would't I need to install it?? I say this with OSX being my frame of reference. When I have done system reinstalls in the past, I have booted off OSX thumb drives, and without installing it, I can't just start doing stuff.

But now Subsonix... You said this other stuff, that I don't need to reboot and I can just unmount either from a terminal command or from disk utility, so if I do that, how do I run those ddrescue command lines? Can they be put into terminal in OSX with the problem drive unmounted? Please explain that part. Thanks!
 
I don't have any friends who would understand that either. But I will make an attempt to read it over and over. I'm hopeful maybe people can help me understand it here.

If the drive is failing due to surface defects, every read with errors will push the drive closer to complete failure.

You need a tool like ddrescue which will clone the readable sectors from the failing drive to a clean drive, then filesystem-based recovery utilities can be used to clean up any filesystem errors on the clone.

It looks like ddrescue might be available for Apple OSX - then the "unmount and clone" using ddrescue from terminal in Apple OSX might do the trick. See http://hints.macworld.com/article.php?story=20050720092514388

Stop using the drive before you kill it completely.
 
My basic question it this: The only place I am held up in is the whole boot from linux DVD. I don't even know where I could get linux or if I did, how to use it. Isn't there a way I could do all that without it? Someone suggested un-mounting it then doing it from there without needing to boot from something. Did I understand that right?

Also prior to resorting to this, should I try another process where I just copy the files? Finder doesn't work, making a disk image doesn't work. What are the other options?

You certainly can boot from a live CD that includes ddrescue, but you can also get ddrescue for OS X and I mentioned the ways you can get it in the previous post. I can't personally vouch for ddrescue, but the approach seems reasonable, because unlike a pure block copy that may fail on errors, this remembers where it failed and attempt to get the next block when it reaches a bad one. Your other options are to find a similar tool I guess, or contact a professional disk rescue service, usually pretty expensive afaik.

I don't get how you would be able to copy the files, because you mention that Finder and diskutility doesn't work. I don't think you should mess around with it in Finder and so on, it may make the situation worse.
 
  • Like
Reactions: crjackson2134
Aiden by read over and over I meant the instructions for ddrescue... NOT the drive! :D:D:D

So ok, I am looking into this OS X thing now.

subsonix, so can you please upload the package manager? I (think) I trust you so I'll give it a shot you guys seem like you know what you are doing. Just please if you can give me as understandable instructions how to do it as possible.
 
subsonix, so can you please upload the package manager? I (think) I trust you so I'll give it a shot you guys seem like you know what you are doing. Just please if you can give me as understandable instructions how to do it as possible.

It's not the package manager, you'll need to get those from their respective web pages if you choose this route, but the fact that I need to point this out makes me a little worried. :) I got ddrescue from the GNU ftp source files and compiled it here, it compiled and passed all tests. I have not personally tried ddrescue though, I have no failed disks around. But you really need to read up a bit on how to use the tool as well, read the included warnings here for example:

http://www.gnu.org/software/ddrescue/manual/ddrescue_manual.html#Important-advice

I'll attach a zip file that contains ddrescue, ddrescuelog and the manual pages.
 

Attachments

  • ddrescue.zip
    66.2 KB · Views: 110
It's not the package manager, you'll need to get those from their respective web pages if you choose this route, but the fact that I need to point this out makes me a little worried. :) I got ddrescue from the GNU ftp source files and compiled it here, it compiled and passed all tests. I have not personally tried ddrescue though, I have no failed disks around. But you really need to read up a bit on how to use the tool as well, read the included warnings here for example:

http://www.gnu.org/software/ddrescue/manual/ddrescue_manual.html#Important-advice

I'll attach a zip file that contains ddrescue, ddrescuelog and the manual pages.

Like I said, I am not very familiar with some of this stuff. I understand computers well from the standpoint of an everyday user. I do learn quickly though, I think. So basically I need the package manager to "run" the stuff you just sent me?
 
Like I said, I am not very familiar with some of this stuff. I understand computers well from the standpoint of an everyday user. I do learn quickly though, I think. So basically I need the package manager to "run" the stuff you just sent me?

No a package manager lets you install software from the terminal, that's one way to get ddrescue, another is to find someone who has made it available directly for download, a third is to compile it from source code. I compiled ddrescue and uploaded it here now. But I really don't know if this is a good idea.. :) Perhaps look around for other similar tools, and let the drive rest while doing that.
 
No a package manager lets you install software from the terminal, that's one way to get ddrescue, another is to find someone who has made it available directly for download, a third is to compile it from source code. I compiled ddrescue and uploaded it here now.
I see. Ok. So basically if I understand the steps correctly (which I'm assuming I might not) I have to unmount the hard drive, then run ddsrescue (which you sent me) and inside I have to type the stuff that AidenShaw had told me up above:

#!/bin/bash
ddrescue -n -b512 -c256 /dev/sda /dev/sdb rescue.log
ddrescue -d -b512 -c1 --retrim /dev/sda /dev/sdb rescue.log


By the way subsonix please check your pm
 
I see. Ok. So basically if I understand the steps correctly (which I'm assuming I might not) I have to unmount the hard drive, then run ddsrescue (which you sent me) and inside I have to type the stuff that AidenShaw had told me up above:

#!/bin/bash
ddrescue -n -b512 -c256 /dev/sda /dev/sdb rescue.log
ddrescue -d -b512 -c1 --retrim /dev/sda /dev/sdb rescue.log


By the way subsonix please check your pm

Basically, but you can ignore the #! line unless you want to put this in a script, and you'll absolutely need to change the /dev/ parts to correspond to the disks you have, then everything but the log part at the end are options. In the linked page to ddrescue above there are many examples for different scenarios with different options. Then lastly since ddrescue isn't installed you'll need to provide an absolute path to it as well. I mean it involves getting up to speed on the shell, disk devices and this particular tool.
 
Basically, but you can ignore the #! line unless you want to put this in a script, and you'll absolutely need to change the /dev/ parts to correspond to the disks you have, then everything but the log part at the end are options. In the linked page to ddrescue above there are many examples for different scenarios with different options. Then lastly since ddrescue isn't installed you'll need to provide an absolute path to it as well. I mean it involves getting up to speed on the shell, disk devices and this particular tool.

In the examples it had only like /dev/hda or /dec/hdb... in my case how do I write the name of my drive? The name is "OLD HD2" and the target to move the files would be called "OWC Mercury Elite Pro BACKUP SPACE"

Also, please again check your PM?
 
In the examples it had only like /dev/hda or /dec/hdb... in my case how do I write the name of my drive? The name is "OLD HD2" and the target to move the files would be called "OWC Mercury Elite Pro BACKUP SPACE"

Also, please again check your PM?

Those are not the names you are after, the device names can be found with diskutil or perhaps even in Disk Utility. I'll check.
 
If the drive is failing due to surface defects, every read with errors will push the drive closer to complete failure.

You need a tool like ddrescue which will clone the readable sectors from the failing drive to a clean drive, then filesystem-based recovery utilities can be used to clean up any filesystem errors on the clone.

It looks like ddrescue might be available for Apple OSX - then the "unmount and clone" using ddrescue from terminal in Apple OSX might do the trick. See http://hints.macworld.com/article.php?story=20050720092514388

Stop using the drive before you kill it completely.


AidenShaw, I'm going to be doing it in osx as subsonix has helped me get ddrescue set up in osx, a few things I need to know..

1) With the OSX method, it is creating a disk image, and is not actually moving the files to a destination, as was done in your linux example. Is this ok? Will I still get the same benefit you mentioned of not applying any stress to the disk?

This is the only code I'm going to be using is
Code:
sudo ./ddrescue -v /dev/disk4s2 MyVolImage.dmg MyVolRescue.log

2) What about the second line? To recover the rest of the data? The linux line you provided was "ddrescue -d -b512 -c1 --retrim /dev/sda /dev/sdb rescue.log" But I cannot figure out how to make it do that in mac. It was in that mac world link you sent, or at least I didn't figure out which one it was.


Thanks!!!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.