Share via


Error 0x80070299 copying file to ReFS

Question

Wednesday, August 1, 2018 7:59 PM

We're retiring a 2008r2 file server using NTFS and migrating the files to a Server 2016 server using ReFS.  Using robocopy to pre-seed the files, a small percentage of the files failed to copy.  The robocopy log reported:

ERROR 665 (0x00000299)...The requested operation could not be completed due to a file system limitation

Trying to manually copy the file generated the error:

Error 0x80070299 the requested operation could not be completed due to a file system limitation

The files copy correctly to NTFS volumes, but trying to copy to any ReFS volume on any server generates the error.  If I copied the file to a FAT32 partition (to strip the NTFS metadata), it would then copy to an ReFS volume with no error, but trying to strip the attributes by going to the file properties, Details tab, and using the "Remove properties and Personal Information" option had no effect (it still failed to copy).

I was able to narrow it down to the presence of a particular Alternate Data Stream (ADS).  All the files that failed have an ADS called "AFP_Resource", which is apparently for Mac compatibility (https://msdn.microsoft.com/en-us/library/dn392833.aspx).  If I remove that data stream or clear the contents of it, the file will then copy with no error.

However, we have a lot of files that also have that ADS that do copy successfully.  We have a fair number of Mac users, so I'd prefer not to remove that data stream from all the files that have it.  Ideally I'd like to remove whatever is problematic about the data stream and leave the rest intact.  Alternatively, it would also be helpful if anyone could re-assure me that removing that data stream won't negatively impact our Mac users.  I suspect it's not important, but I'd rather not find out by stripping the stream from thousands of files and end up getting a bunch of phone calls. ;)

I suspect I'm going to end up using robocopy to identify the problematic files and then script removing this ADS just from those files, but if anyone has more info on this I would love to hear it.

More info below for those who might also be struggling with this.  It took me a few hours to track this down, so hopefully this will save someone else some time.

You can see what alternate datastreams exist for a file using either of the following:
dir /w
get-item <filename> -stream * | select Stream,Length

Remove a data stream:
remove-item <filename> -stream <stream name>

Clear contents of a data stream:
clear-content <filename> -stream <stream name>

View contents of a data stream:
get-content <filename> -stream <stream name>

Decent blog post explaining NTFS attributes (particularly $DATA, but also $STANDARD_INFORMATION, $FILE_NAME, etc.):
https://blogs.technet.microsoft.com/askcore/2009/10/16/the-four-stages-of-ntfs-file-growth/

All replies (4)

Thursday, August 2, 2018 2:03 AM âś…Answered | 1 vote

Hi jaffy27,

Based on the research, as you described, that could be Alternate Data Stream.

http://bakins-bits.com/wordpress/?p=140

Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

But in fact for now, I still couldn't find the easy way to move this for large number files. You may still need the scripts to achieve this.

Maybe like the thread discussed before.

https://social.technet.microsoft.com/Forums/windowsserver/en-US/eed9ed41-00d5-4db2-b2aa-80b9c210e3e3/script-to-delete-macintosh-supported-stream-names-not-working?forum=ITCG

And for more support about scripts, I'm afraid you may still consult in Our Scripts forum

https://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=ITCG

Thanks for your support and understanding.

Best Regards,

Mary

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].


Thursday, August 2, 2018 3:33 PM

That first link was very helpful - that appears to be the problem.  It's not the AFP_Resource ADS specifically that's the problem, but the fact that those streams are over the size limit.

I was able to identify the problem files and then remove the data streams with a powershell one liner.

Get-ChildItem -recurse | get-item -stream * | ? Stream -ne ':$DATA' | ? Length -gt 131072 | ForEach-Object {remove-item $_.FileName -stream $_.Stream -whatif}

Thanks!


Monday, November 26, 2018 7:45 PM

Hi,

I have the same error when I copy MP3 files from a Synology NAS to a Server 2016 server using ReFS. Some MP3 files copy and some don't. Copying to NTFS, I have no problems. If I copy the MP3 files first to a exFAT drive and then to ReFS, will it work?

Kind regards,
Sven


Wednesday, February 6, 2019 6:07 PM | 1 vote

I'll add my experience to this;

I was just moving one of my data volumes within Windows 10 1809 from a NTFS drive to a ReFS drive using robocopy when it failed with a url shortcut. Originally i thought it was because the URL filename had cyrillic characters in the name but what it turned out to be is that the favicon, the little image for the URL is stored as a ADS within the file. Thanks to nirsoft for mentioning that. When i stripped off the favicon it was fine to copy.

So there is something about copying ADS files from NTFS to ReFS.

Hope this helps someone.