5

I have a very large video file on a USB external hard disk. It is about 13GB. I can play the video directly, and it seems there's no problem. But if I try to copy the file to other places, I got a strange error and the USB device is disconnected automatically, then connect back again.

I tried copying from KDE, using cp, or rsync, no luck. I am running out of ideas. I have never seen this kind of problem before.

P.S.

  • The file is on a LVM partition.
  • I don't have the error message now. But I remember it was some like

Failed to read block ...

2
  • 4
    What is the error message?
    – Bernhard
    Oct 20, 2013 at 12:00
  • Can you add dmesg|tail -n 20 or other logs from syslog?
    – forcefsck
    Oct 20, 2013 at 12:04

2 Answers 2

8

You could try your luck with ddrescue. It's usually used for whole disks or partitions, but it also works with single files. It keeps a logfile for retries.

ddrescue /source/your_video.avi /target/your_copy.avi /target/your_copy.logfile

If the disc vanishes in this process, just remount it and start the command again, and it should resume where it left off.

ddrescue also has a bunch of options, use info ddrescue for a manual and more detailed usage examples.

If you have a disk to spare, making a whole disk copy might give better results. It depends on what's damaged exactly - the file itself or just filesystem metadata.

1
  • Right. This is when it does make sense to have your defective drive partitioned somehow. :) Because this will make the (raw) partition images significantly smaller. If the HDD is 1 TB and you were using the whole 1 TB as one primary partition, you will have to get your hands on a destination HDD with a little more than 1 TB of continuous free space to put it onto. And this is not always as easy as it sounds... Nov 21, 2014 at 7:32
2

Your drive is likely failing. You should see messages to this effect in your dmesg log. I would attempt to repair the disk with either HDAT (freeware) or possibly Spinrite (Commercial). I've used both of these tools to recover disks that were failing and they have both worked well in the past.

Additionally you can check the drive's SMART info:

$ smartctl --all /dev/{hd?,sd?}

This won't fix anything but will let you know if there is something up with the health of the drive.

Once the drive is in a usable state I'd use Clonezilla to replicate it as quickly as you can to an alternate HDD, or get that one video file off of the HDD.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .