USB 3.0 Trouble

I am using a WD Elements Portable 1TB USB 3.0 2.5" disk bought in May 2014 to backup data of my desktop machine. rsync runs smoothly without any error messages. However upon restoring data from the USB drive I found a large fraction of files with zero length.

I tried fsck -f /dev/sdd and dd if=/dev/sdd of=/dev/null which never reported any errors. On my older machine using USB 2.0 I set up a loop rsyncing a 5GB directory, verifying with diff -r and deleting the directory without any errors during several hours of operation.

Any ideas how to troubleshoot this?

Hello karlmistelberger,
Few years ago i had a similar problem… Basically the chipset was bugy with some partition geometry…
So you should try with a different partitioner, maybe a different file system as well.
another thing is to check if there is an update for the usb drive firmware (controller of the hdd).
It’s also possible that the usb 3.0 cable is bad…
I do not know if there is a tool to check all this , sorry…

You don’t say whether you have tried diff -r on your current setup. My first question would be: were they copied faithfully to the portable disk? The fact that rsync does not report any errors may be because the disk was misleading rsync. If they were not copied faithfully, then you are not going to be able to restore them. If they were copied faithfully, then maybe a dd (or dd_rescue) copy will work.

Maybe you need: fsck -f /dev/sdd1
Or, if it is NTFS, better to plug into a Windows box and run “CHKDSK /f” there.

i have not had issues with a WD usb3 drive ( mine is a WD my-book )
now , i did reformat it from the factory NTFS to a GPT and ext4 and removed the Microsoft software on it

rsync has never given me problems on it ans i have about a 1TB partition full using rsync

what format is this drive ?
ntfs ?
ext3 or 4 ?

Many thanks for looking into this problem.

Just for clarification:

hofkirchen:~ # fdisk -l /dev/sdc

Disk /dev/sdc: 931.5 GiB, 1000202043392 bytes, 1953519616 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xbf9e7e78

Device     Boot    Start        End    Sectors   Size Id Type
/dev/sdc1  *        2048   67110911   67108864    32G 83 Linux
/dev/sdc2       67110912 1953519615 1886408704 899.5G 83 Linux

hofkirchen:~ # fsck -f /dev/sdc2
fsck from util-linux 2.25.1
e2fsck 1.42.12 (29-Aug-2014)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
WD25-BACKUP: 823872/58957824 files (0.7% non-contiguous), 39802894/235801088 blocks

hofkirchen:~ # mount|grep sdc2
/dev/sdc2 on /run/media/karl/WD25-BACKUP type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)
hofkirchen:~ # 

I tested writing as described in the initial post and verified the copies by issuing diff -r using the USB 2.0 port of my old machine. Problems arose with my new machine using USB 3.0. rsync -av did the copy silently without reporting any errors. However when checking the copies numerous files were found to have exactly zero length. Thus I am worried.

When buying the device I performed a frequent verification with diff -r during the first weeks and never detected any errors. After some time I stopped doing so and was really embarrassed finding the copying errors which occurred completely silently. 9,704 out of 823,872 files are exactly zero length, most of them jpegs or header files. The error is always the same: either the files copied are intact or zero length, no partial copies or changed bytes occur.