Mac High Sierra cp command returns "Result too large"

2

Having a devil of a time figuring this out. I've got the latest MacOSX (10.13.2). I am trying to copy a file to an external drive for my backups. Ran into an error where cp returns "Result too large" and stops copying. Through debugging I eliminated the external drive and am using /tmp as a destination. Same error. I have over 600gb free on my drive, so it's not a full drive issue. I don't think it is a filesize issue either. The file that is roughly 4.1gb errors, while the file that is 4.3gb copies without issue.

Source files:

-rw-------  1 me  staff  4332060672 Jan 22 15:13 Virtual Disk-cl1-s007.vmdk
-rw-------  1 me  staff  4115791872 Jan 22 14:48 Virtual Disk-cl1-s008.vmdk

Copying file 1 (successful):

C02W114MHTDF:TNT-VPN.vmwarevm me$ cp Virtual\ Disk-cl1-s007.vmdk  /tmp/
C02W114MHTDF:TNT-VPN.vmwarevm me$ echo $?
0

Copying file 2 (fails):

C02W114MHTDF:TNT-VPN.vmwarevm me$ cp Virtual\ Disk-cl1-s008.vmdk  /tmp/
cp: Virtual Disk-cl1-s008.vmdk: Result too large
C02W114MHTDF:TNT-VPN.vmwarevm me$ echo $?
1

After the copy, the files that were copied look like this in /tmp:

-rw-------  1 me  wheel  4332060672 Jan 22 16:26 /private/tmp/Virtual Disk-cl1-s007.vmdk
-rw-------@ 1 me  wheel  2227175424 Jan 22 16:26 /private/tmp/Virtual Disk-cl1-s008.vmdk

Notice that the second file only copied about 2.2gb of the 4.1gb file, but the first file copied over with the proper size.

I am at a loss to figure this one out. In all my Unix and Linux years, I've never seen this type of error out of cp.

I can use tar and mv without any issue. cksum fails with the same error.

The program that I'm using for my backups, though, uses something similar to cp, so I'm trying to debug with that first before ripping that tool out for something different that would work.

Mark

Mark Mumy

Posted 2018-01-22T22:48:14.893

Reputation: 21

What filesystem is on your external drive? Also, are you using LVM? Is /tmp its own partition? – Nasir Riley – 2018-01-23T00:17:04.003

Use Disk Utility to do a First Aid run on the source and destination volumes. Do both come up clean? I also second Nasir's request to know what filesystem formats we're dealing with here, for both the source and destination. APFS? HFS+J? Something else? – Spiff – 2018-01-23T02:52:57.207

This is a brand new Mac with default config. /tmp is on the root filesystem /. This isn't a drive issue unless I have 4 drives that are all magically bad. I have the internal drive (brand new) and 3 external drives (all newly formatted). I've reformatted the drives and played with APFS as well as Mac OS Extended/Journaled (HFS+J). Consider, too, that I can put those same external drives on my old Mac and they work. Also consider that seven out of 10 files that are 3-4gb in size do copy. If it were a bad drive, reformatting would have worked and all files would have failed. – Mark Mumy – 2018-01-23T13:08:21.540

@MarkMumy I get that you've tried a lot of things but I'm not sure you answered the specifics of my question. Can you do a Disk Utility First Aid scan on the volume the problem file resides on right now? Does it come up clean? (Note: this is looking for filesystem data structure corruption that happened since the last time you formatted this partition; it is not looking for hard drive failure.) Also, what filesystem format does the problem file reside on right now? – Spiff – 2018-01-23T21:50:43.187

Sorry, yes. All checks come back clean. I thought that was implied when I said that all drives had been reformatted.

I’ve even erased and reformatted all 3 of my ssds and reformatted today. I get the same issue on three different ssds and even a usb stick. When I put those same drives on my other laptop with the same files I don’t get an error. I have both hpfs+j and apfs where it fails.

First aid comes back clean on my 1tb built in drive too. On both machines.

Mark – Mark Mumy – 2018-01-24T17:11:52.417

I migrated my files from an old to new mbp via time machine. All copy routines work on the old mbp. On the new mbp 7 out of 10 files copy clean. 3 files fail to copy and also fail when cksum is run on them.

This isn’t an ssd or file system issue. I take the drive from the new machine where the copy just failed and put it on my old machine. A copy of the same file works to the ssd that just failed on the new machine. Not sure how this is an ssd or file system issue – Mark Mumy – 2018-01-24T17:12:04.700

Answers

0

This could be a hardware failure. I've gotten this error on an external SSD drive (HFS+ formatted) which appears to have failing hardware. (Same drive on Ubuntu gives intermittent "input/output errors"; SHA checksums change when large files are copied.)

Leopd

Posted 2018-01-22T22:48:14.893

Reputation: 288