LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-02-2017, 10:35 AM   #1
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Rep: Reputation: 11
Post Clone a corrupted HDD.


Hello
I have an external HDD and it has some problems. I like to clone it but it is not possible. I used below "dd" command:
Code:
$ sudo dd if=/dev/sde of=/media/jason/A0148B1C148AF516/hdd1.dd conv=noerror bs=4M
But I got :
Code:
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 180.282 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 540.297 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 900.309 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 1080.31 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 1260.32 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 1440.33 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 1620.33 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 1800.34 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 1980.35 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 2160.35 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 2340.36 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 2520.36 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 2700.37 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 2880.37 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 3060.38 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 3240.38 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 3420.39 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 3600.39 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 3780.4 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 3960.41 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 4140.41 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 4320.42 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 4500.43 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 4680.43 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 4860.44 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 5040.45 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 5220.45 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 5400.46 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 5580.46 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 5760.47 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 5940.47 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 6120.48 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 6300.48 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 6480.49 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 6660.49 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 6840.49 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 7020.5 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 7200.51 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 7380.51 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 7560.51 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 7740.52 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 7920.52 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 8100.53 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 8280.53 s, 0.0 kB/s
dd: error reading ‘/dev/sde’: Input/output error
0+0 records in
0+0 records out
And after sometime the size of output file was 0 byte. I used "ddrescue" too :
Code:
$ sudo ddrescue -d -r3 /dev/sde /media/jason/A0148B1C148AF516/hdd1.img
And result is:
Code:
GNU ddrescue 1.19
Press Ctrl-C to interrupt
rescued:    27414 MB,  errsize:       0 B,  current rate:   33161 kB/s
   ipos:    27414 MB,   errors:       0,    average rate:   30562 kB/s
   opos:    27414 MB, run time:   14.95 m,  successful read:       0 s ago
Copying non-tried blocks... Pass 1 (forwards)
It just copy 27 GB of my HDD. any idea to clone whole disk?

Thank you.
 
Old 07-02-2017, 10:45 AM   #2
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
You can use CloneZilla, Macrium Reflect or similar, using a boot media.
 
Old 07-02-2017, 11:36 AM   #3
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Just let ddrescue run, at least until there have been no successful reads for at least an hour or two. That may take several days, but it will do the best it can. If the drive supports it, you might speed up the scan by using the "-l scterc" option in smartctl to restrict the time the drive spends trying to do its own error recovery. See the smartctl manpage for details.
 
1 members found this post helpful.
Old 07-03-2017, 02:19 AM   #4
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
Quote:
Originally Posted by rknichols View Post
Just let ddrescue run, at least until there have been no successful reads for at least an hour or two. That may take several days, but it will do the best it can. If the drive supports it, you might speed up the scan by using the "-l scterc" option in smartctl to restrict the time the drive spends trying to do its own error recovery. See the smartctl manpage for details.
Can you show me the full command?
I used "sudo smartctl -l scterc /dev/sdc" and I got:
Code:
smartctl 6.4 2014-10-07 r4002 [x86_64-linux-3.16.0-4-amd64] (local build)
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org

Read Device Identity failed: scsi error unknown error (unexpected sense key)

A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.
Any idea?

Last edited by hack3rcon; 07-03-2017 at 02:26 AM.
 
Old 07-03-2017, 08:03 AM   #5
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by hack3rcon View Post
I used "sudo smartctl -l scterc /dev/sdc" and I got:
Code:
smartctl 6.4 2014-10-07 r4002 [x86_64-linux-3.16.0-4-amd64] (local build)
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org

Read Device Identity failed: scsi error unknown error (unexpected sense key)

A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.
Is this drive connected via USB? It appears that the external enclosure has a USB bridge chip that does not support the needed commands for SMART. There is no workaround for that other than removing the drive from the enclosure and connecting it directly via SATA. (That's assuming that the bare drive actually has an SATA interface. In particular, some WD external drives get rid of the bridge by having the USB interface on the drive itself, so there is no alternative there.)
 
Old 07-03-2017, 09:44 AM   #6
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
Quote:
Originally Posted by rknichols View Post
Is this drive connected via USB? It appears that the external enclosure has a USB bridge chip that does not support the needed commands for SMART. There is no workaround for that other than removing the drive from the enclosure and connecting it directly via SATA. (That's assuming that the bare drive actually has an SATA interface. In particular, some WD external drives get rid of the bridge by having the USB interface on the drive itself, so there is no alternative there.)
Yes, It is USB. It is not WD it is Seagate.
 
Old 07-03-2017, 12:12 PM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
never mind, try to take out the hdd and use a sata cable to connect it to your PC.
 
Old 07-03-2017, 12:52 PM   #8
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by pan64 View Post
never mind, try to take out the hdd and use a sata cable to connect it to your PC.
Before doing that, you might want to see whether the drive supports Error Recovery Control at all. Run "hdparm -I /dev/sdc" and see whether "SCT Error Recovery Control (AC3)" is listed as a supported feature.
 
Old 07-04-2017, 05:00 AM   #9
voleg
Member
 
Registered: Oct 2013
Distribution: RedHat CentOS Fedora SuSE
Posts: 354

Rep: Reputation: 51
Try another cage, adapter, usb cable, power supply.
I had problems with disk that resolved by usb cable replacement.
 
Old 07-05-2017, 07:01 PM   #10
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
The bridge chipset can also go bad.
 
  


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
Need to clone HDD to SSD RvBVakama Linux - Software 24 11-18-2019 08:18 PM
HDD parition corrupted? mikeb1986 Linux - Newbie 9 02-10-2016 08:18 PM
getting clone of hdd divyashree Linux - Newbie 11 09-12-2010 01:56 PM
corrupted HDD: need to place backup onto different HDD Cyberman Linux - Desktop 6 09-26-2009 10:51 PM
Duplicating a corrupted HDD carlos_vcan Linux - Newbie 6 05-23-2008 02:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:50 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