LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 04-30-2016, 02:52 AM   #31
doramzy
LQ Newbie
 
Registered: Oct 2015
Posts: 17

Original Poster
Rep: Reputation: Disabled

Hi, quick question is it better to have the drive to backing up your files from (source drive) mounted or unmounted and what of the drive you are backing up your files to (destination drive)
 
Old 04-30-2016, 06:48 AM   #32
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,947

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Assuming you are not simply "cloning" your entire disk,

You need the source to be mounted (so you can read it) and the destination to be mounted (so you can write to it).
 
Old 04-30-2016, 01:04 PM   #33
doramzy
LQ Newbie
 
Registered: Oct 2015
Posts: 17

Original Poster
Rep: Reputation: Disabled
ddrescue /media/user/SourceDrive /media/user/DestinationDrive/Source.img /media/user/DestinationDrive/Source.log


Could someone please tell me what I'm doing wrong here because it finishes in a second recovering 0 bytes?
 
Old 04-30-2016, 01:07 PM   #34
doramzy
LQ Newbie
 
Registered: Oct 2015
Posts: 17

Original Poster
Rep: Reputation: Disabled
okay think I figured it out its

>> ddrescue /dev/sdc1 /media/user/DestinationDrive/Source.img /media/user/DestinationDrive/Source.log <<
 
Old 04-30-2016, 01:31 PM   #35
doramzy
LQ Newbie
 
Registered: Oct 2015
Posts: 17

Original Poster
Rep: Reputation: Disabled
I've had it on for hours and it still says it's only rescued 166354 kb??
 
Old 04-30-2016, 01:48 PM   #36
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,776

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by doramzy View Post
I've had it on for hours and it still says it's only rescued 166354 kb??
Hours?? That's just 24 minutes since your "it finishes in a second recovering 0 bytes" message.

What does the rest of the status look like?

Last edited by rknichols; 04-30-2016 at 01:49 PM.
 
Old 04-30-2016, 08:22 PM   #37
doramzy
LQ Newbie
 
Registered: Oct 2015
Posts: 17

Original Poster
Rep: Reputation: Disabled
Okay the reason I said hours because I just knew after having it on for hours like last time it would only come to that and yet it did but only this time it did give me an error that I couldn't figure out how to resolve.
It said that I couldn't write to the logfile no more for some reason and asked either resolve the issue or abort. I don't understand this problem but I accidentally aborted with control-c option when I was actually trying to copy the error and paste it here
 
Old 04-30-2016, 08:27 PM   #38
doramzy
LQ Newbie
 
Registered: Oct 2015
Posts: 17

Original Poster
Rep: Reputation: Disabled
The last time I set the logfile to be written on my local desktop for some reason I could neither logon properly with my password after that and when I finally managed to log on my desktop, it was playing up really funny, I couldn't click on anything, it would just flash and nothing would happen when I tried to click on something. I restarted my computer and now cut a long story short, I decided to try ddrescue with an empty 500gb internal drive and write the logfile to the same drive instead of my local drive desktop and now here I am
 
Old 04-30-2016, 08:39 PM   #39
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,776

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
How big was the partition you were trying to rescue? Your destination drive needs to have at least enough space for the entire source partition (all of it, not just the used part) plus the log file if you're storing that in the same place. When you don't show what status is actually displayed and just say, "I couldn't write to the logfile no more for some reason," I'm left guessing in the dark. Details are important. It sounds like you might have filled up the destination drive/partition and thus the write to the log file failed.
 
Old 04-30-2016, 08:53 PM   #40
doramzy
LQ Newbie
 
Registered: Oct 2015
Posts: 17

Original Poster
Rep: Reputation: Disabled
Well the partition I'm trying to rescue is 1tb but it only has 25gb of data on it that I would like to rescue. I've just changed write permissions to the destination drive and ddrescue seems to be working now continuing from where it left off. The bytes recovered are increasing now thank god!
 
Old 04-30-2016, 08:55 PM   #41
doramzy
LQ Newbie
 
Registered: Oct 2015
Posts: 17

Original Poster
Rep: Reputation: Disabled
Okay It's recovered 435gb but I don't want the whole TB recovered as I don't have enough space for that so I've interrupted it. Is that right? and how should I mount it?
 
Old 04-30-2016, 10:04 PM   #42
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,776

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
There are a couple of ways to proceed.
You can use ddrescue to recover individual files. That only works if the filesystem is mountable (read-only, preferably) and the bad sectors are in the file's data blocks, not the filesystem metadata.

If the errors are just in isolated sections of the disk, you can use ddrescue] to attempt recovery of just that area. Earlier you reported that dd read about 166MB of partition 1 before hitting a bad sector. Let's see if the rest of the drive is good. Try
Code:
dd if=/dev/sdc1 bs=1M skip=450 of=/dev/null
If that completes without error, you could do this
Code:
ddrescue -i 160M -s 300M /dev/sdc1 /media/user/DestinationDrive/Source.part.img /media/user/DestinationDrive/Source.part.log
That will give you a 300MB sparse file with the recovered portion of the source partition. If that all works, I can show you how to stitch together a virtual device that you should be able to mount and recover data from.

BTW, when you are imaging a partition it should not be mounted read/write.

Last edited by rknichols; 04-30-2016 at 10:06 PM.
 
Old 05-01-2016, 05:47 PM   #43
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,978

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
Might be worth it to run the OEM diags. Sometimes they can fix issues.

Not sure you've proved what is bad just yet. Controller, cable and power issues still are there aren't they?
 
Old 05-23-2016, 08:43 AM   #44
cesarbergara
Member
 
Registered: Feb 2012
Location: Buenos Aires, Argentina
Distribution: Debian, Suse, Mandrake,
Posts: 92

Rep: Reputation: Disabled
Hi. I think ddrescue work slow because your HD is to much damaged.
Patient, and good luck.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to mount seagate 1Tb usb expansion drive Sotux121 Linux - Newbie 7 07-24-2019 05:58 PM
[SOLVED] Need NTFS USB 1TB hard drive needs to be read only except under Linux qlue Linux - Security 4 12-28-2014 08:11 AM
LXer: Seagate 1TB Solid State Hybrid Drive LXer Syndicated Linux News 0 11-26-2013 08:51 PM
device descriptor read/8, error -110 seagate external hard drive genex Linux - Hardware 1 09-08-2007 12:40 PM
How to back up files off a failing hard drive? Kyanos Linux - Hardware 6 10-05-2006 01:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:15 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration