0

I'm trying to copy an external USB hard drive to another using DD.

my command:

dd if=/dev/sdb of=/dev/sdc conv=noerror,notrunc iflag=noatime status=progress

I'm using a live debian 10 distro. During the copy, after some gb copied,the transfert rate starts to decrease and I can see in the syslog that a new removable drive have been found, named say /dev/sdd and fdisk -l tells me /dev/sdc doesn't exist anymore. If I wait the DD transfert stops even if the process is still alive. Using dd for a while, never had this problem before. Any workaround?

  • More likely you have the device reconnecting. This can happen on bad connection or faulty device or if its controller is overloaded and resetting. New letter is assigned because old one is still busy with your dd. Default block (512 bytes) is not recommended for any setup, so first thing you may try is to add bs=128k or bs=1M. You may also want to slow down dd, but you will have to use pv utility instead. If this is faulty HDD connected to USB - you should use normal SATA controller instead, because USB-SATA is known to feel bad on disk errors or power chokes. – kab00m Apr 11 '20 at 17:41
  • 1
    If this is a faulty drive you want to restore - you should first use blocksize of the real filesystem blocksize (to restore as much data as it can) - if it is not known set bs=4k. And using USB-SATA devices is bad because controller is reset when error occurs what make it to reconnect USB side. – kab00m Apr 11 '20 at 18:04

0 Answers0