Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a very large video file on a USB external HDD. 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 dont have the error message now. But I remember it was some like

Failed to read block ...

share|improve this question
4  
What is the error message? –  Bernhard Oct 20 '13 at 12:00
    
Can you add dmesg|tail -n 20 or other logs from syslog? –  forcefsck Oct 20 '13 at 12:04

2 Answers 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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.