Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

/usr/bin/cp fails copying correctly from USB device

NorbertBJun 26 2017 — edited Jul 13 2017

I get a curious behavior of the cp command on about 1..2% of my photos, when copying from my camera (LUMIX FZ1000),

mounted as a USB-device.

I am copying from the concerning folder under /media to some folder in my home.

I kept one of the concerning photos (size: 10131456 bytes) on the camera, and alternatively tested with /usr/bin/cp and /usr/bin/dd.

Using dd, I tested with different block sizes. The result is as follows:

When I use /usr/bin/cp, the last about 5% of the copied capacity of the photo are copied faulty.

When I use /usr/bin/dd with following block sizes (bs=)

512 .. 16384 in 2^n steps, 20480, 40960, 8388608, 10131456, 16777216,

all works fine.

Camera- and Card-data:

  • File system of the mounted camera: pcfs
  • SD card specification: SDHC class 10, U3 (95MB/s, 32GB), formatted in the camera
  • File type: JPEG

Computer- and System-data:

  • USB specification: 2.0
  • Block size of the (mirrored) disks 4096
  • ashift: 12
  • OS: Solaris 11.3
  • File system: ZFS
  • ZFS pool version: 37

Any ideas why /usr/bin/cp fails?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 10 2017
Added on Jun 26 2017
24 comments
929 views