Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

URGENT ~ Need help with ddrescue interrupt and resume


  • Please log in to reply
6 replies to this topic

#1 David4321

David4321

  • Members
  • 4 posts
  • OFFLINE
  •  
  • Local time:05:10 PM

Posted 25 March 2015 - 11:03 PM

Hello,
 
I'm in the midst of a hard drive recovery using gddrescue on Zorin 9 (Ubuntu variant). Both the source and destination drives are connected internally to my tower, and neither is the os drive. Neither are mounted. I'm a very advanced windows user, well into my first year in Linux, getting my bearings ok by now, but still very new to using terminal in advanced ways.
 
The source drive may be failing, but then again it may not. (I checked the SMART readout on the drive, and it displays "PASSED".) Not taking chances, I'm assuming drive failing, but may be some other problem. Symptom was drive slow to mount and change directories, certain files and folders started going missing or inaccessible.
 
ddrescue seemed like the best tool for the job, but struggling with the commands. After extensive forum surfing and many false starts (why isn't there a straightforward step-by-step tutorial and good documentation on this important program anywhere?) and complete failure to get DDRescue-GUI to work, I managed to get the recovery underway. 
 
I used this string: sudo ddrescue -d -f -r2 /dev/sdc1 /dev/sdb1 logfile
 
-d to go direct to drives and leave them unmounted, -f because it was being finicky about (over)writing to my empty designated new destination partition. Both source drive and destination partition are 3tb total. (over 2tb of actual data on source, probably around 2.5tb)
 
It's been running 4 days now, and starting to slow down a lot. Current stats: rescued: 493165 MB, errsize: 3316 MB, errors: 5304, current rate 8192 B/s, average rate: 1465 kB/s, time since last successful read: 0 s. (rates dropping steadily over last day, but no stoppages or failure to read)(it has been unavoidable to use other programs on this system during recovery)
 
I want to try to interrupt recovery now, reboot computer, then resume recovery. I hope this will help with the speed of progress. (and give drives time to cool down and rest) The problem is: I'm hesitant to do this because I'm not certain I created the logfile properly, and I don't want to lose my progress. I configured my commands as above based on a forum post, but then noticed other discussions showed people naming the logfile (logfile.logfile, or logflie.log) or even specifying the location for the logfile, which I wish I had known how to do. 
 
Here are my questions:
 
 1. By using the simple command "logfile" after designating the source and destination drives, have I successfully insured that a logfile will be created or not?
 2. If not, what options do I now have to create one, interrupt, and resume?
 3. If so, how do I determine the default location of the logfile?
 4. Given the commands I used to start the recovery, what would be the correct commands be to start the resume? 
 
Thanks in advance!


BC AdBot (Login to Remove)

 


#2 wizardfromoz

wizardfromoz

  • Banned
  • 2,799 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:10:10 AM

Posted 26 March 2015 - 03:05 AM

David4321, hi and :welcome: to Bleeping Computer.

I am an intermediate Zorin User, but haven't used ddrescue, although I am familar with Terminal, and a number of GUIs based thereupon. So I can't help with the immediate problem.

 

I will suggest two (2) steps for you to take until help arrives, and those are:

 

  1. Look at my Profile via my Avatar, also my Signature below, and see what you can flesh out with regard to your specs and configuration - I see you have plenty of storage but info on eg - dual-boot or not (with or without Windows) will be useful.
  2. Screenshots will help - see Moderator Stolen's Post in this Topic - http://www.bleepingcomputer.com/forums/t/536686/how-do-i-post-a-screen-shot/?hl=%2Bimgur+%2Btinypic+%2Bphotobucket#entry3386653 or see NickAu's Pinned Topic near the top of the entry page to Linux and Unix

Good luck

 

:wizardball: Wizard



#3 mremski

mremski

  • Members
  • 498 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:NH
  • Local time:08:10 PM

Posted 26 March 2015 - 06:57 AM

Note:  It's been a while since I've used this utility.
 
 1. By using the simple command "logfile" after designating the source and destination drives, have I successfully insured that a logfile will be created or not?
I believe so
 
 2. If not, what options do I now have to create one, interrupt, and resume?
Been a while, but I imagine Ctrl-C should interrupt the command, rerunning the command should resume.
 
 3. If so, how do I determine the default location of the logfile?
I'm guessing the logfile should be in the directory you started the command from.
 
 4. Given the commands I used to start the recovery, what would be the correct commands be to start the resume?
Should be the same as what you used initially.
 
Did you run across this?  There were a couple of notes in the examples about partition tables.
 

FreeBSD since 3.3, only time I touch Windows is to fix my wife's computer


#4 David4321

David4321
  • Topic Starter

  • Members
  • 4 posts
  • OFFLINE
  •  
  • Local time:05:10 PM

Posted 26 March 2015 - 09:08 PM

Thanks very much. That's helpful. Speed seems to have picked up overnight, so I'm just leaving it run. Maybe it was working through a more damaged sector.



#5 wizardfromoz

wizardfromoz

  • Banned
  • 2,799 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:10:10 AM

Posted 27 March 2015 - 02:05 AM

David4321 that article of mremski's is a good starting point by the looks of it.

 

Albeit the article's origins appear dated, reading right to the end of the page/article shows input as recent as February just past.

 

If you are not already aware, Zorin ships with (g)ddrescue as a part of its (UBuntu-based) repository, accessible via Synaptic Package Manager. Version I have listed there is 1.17-1.

 

From GNU Project Archives listed here, latest version appears to be 1.19, but a run of

sudo apt-get update

... should remedy that, if you wish the latest.

 

I note that the article mremski referred to appears to include some confusion over differences between ddrescue, dd_rescue, and of course gddrescue. Just FYI.

 

Last, if you have not done so yet in your Linux Adventure, you should run, from Terminal

sudo ufw enable

... this will instantly firewall you (not enabled by default in many 'buntu based Distros), and generate a script that will apply at every bootup/reboot.

 

I'll bow out from here, but good luck, again, and I will watch with interest on your progress.

 

:wizardball: Wiz



#6 mremski

mremski

  • Members
  • 498 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:NH
  • Local time:08:10 PM

Posted 27 March 2015 - 06:24 AM

Thanks very much. That's helpful. Speed seems to have picked up overnight, so I'm just leaving it run. Maybe it was working through a more damaged sector.

That's encouraging.  Damaged sectors can cause a bit of thrashing in code;  code tries to read a chunk, hardware has trouble reporting it, does retries, lather rinse repeat.  Some filesystems are better at dealing with it (RAIDs, mirrors, things with checksums, etc), but all suffer from damaged hardware to different extents.  The original disk sdc1, what type of disk, how was it formatted?  When the ddrescue finishes, you may want to try running fsck on it (file system checker)  to see if it can correct anything that may be wrong.  Slow to mount can be due to that sometimes.  Slow to cd I've had that happen when your PATH includes directories that don't exist (this can be shell dependent).  Missing files and directories:  if the device is automounted, trying to look at it may before it's mounted may give false results, sometimes things in graphical tools need a "refresh" to pick up changes.

 

Embrace the terminal window/CLI.  Doesn't take much to get used to it;  old dogs like me hate doing things on Windows:  "What GUI do I have to bring up to see the IP address and netmask?".

 

Keep in mind "man is your friend".  man pages.  man -k to search for commands matching a keyword, whatis is a similar tool.  Dr Google can give you an overload of information, some out of date (thanks for pointing that out Wiz), but even out of date can give you a better idea of what you are looking for.  I typically toss in as many keywords as possible;  "linux linuxmint17 ddrescue" is better than "ddrescue" or "linux ddrescue".


FreeBSD since 3.3, only time I touch Windows is to fix my wife's computer


#7 wizardfromoz

wizardfromoz

  • Banned
  • 2,799 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:10:10 AM

Posted 29 March 2015 - 09:36 PM

 

Keep in mind "man is your friend"

 

:thumbup2: +1

 

Add to that :

  • If you find the Manual in Terminal is 567 pages long or has 17,000 lines (go Ctrl-End to find)
  • Type in Google or DuckDuckGo "<name of> Manual print version or online version - you will often find a version you can download and save to digest at leisure

I found this particularly useful when I was first embracing scripting and Aliases, in my New to Linux &c Topic. The direct link for where the discussion began is as follows:

 

http://www.bleepingcomputer.com/forums/t/548703/new-to-linux-newbies-gurus-not-so-newbies-all-distros-tips-lore/page-5 at #68, but of particular interest to me is:

 

http://www.bleepingcomputer.com/forums/t/548703/new-to-linux-newbies-gurus-not-so-newbies-all-distros-tips-lore/page-6 at #89. The part of relevance begins at:

 

 

Yesterday, Sunday Queensland time, I emailed one of the Developers about this scripting and Aliasing issue. I had simply typed in "man sudo" at Terminal, ^Ended to nearly the end, and found that Todd C. Miller was the main author of sudo manuals. Todd's C-V, or resume, indicates, amongst other items of interest (he works with Dell, but sudoes voluntarily):

 

"1993–Present Lead developer of the Sudo root privilege control package." I wonder if he know Linus Torvalds? Hhmm, lol.

 

Todd IS Mr Sudo, effectively.

 

Note how I found Todd Miller's name and email contact.

 

You can this with many manuals on Terminal, and you might be surprised to find how approachable some of these Gurus are, if you have questions. If you choose to do so, perhaps share the results you learn with us here?

 

Speaking of sharing, you are new to this forum, and not expected to be a mind reader, but then - nor are we. Obviously when you need answers quickly, it is understandable that you might wish to search different avenues in terms of forum websites. But if so, please let us know, and also what you are told.

 

Your request at

 

http://forums.techguy.org/linux-unix/1145478-urgent-need-help-ddrescue-interrupt.html

 

appears to have commenced at almost the same time as the one you started here, and with the same input from yourself.

 

Members here whom might have solutions for you might spend considerable time to work them out and check them and report on them, only to find that you have had the answer already from elsewhere, or else received conflicting suggestions.

 

Just a tip on polite etiquette.

 

:wizardball: Wizard






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users