Need help: Windows script has file access problems
A client has a Windows 2012 server running a program that essentially moves some files around from one place to another. The script grabs the file from the cloud, copies it to a Mac Pro server, then re-copies it from there to another Windows box. This script has been running for years without issue. However, we now randomly get file access errors.
This started when we upgraded the Mac server from an Xserve running OS X 10.7.x server to a new Mac Pro 2013 running OS X 10.5 server. The new Mac Pro has its data stored on a LaCie 8BIG rackmount RAID that has 36TB of storage.
Here is the error (for this example, I renamed a few directory names to make it generic):
System.IO.IOException: The process cannot access the file '\\abc-macsrv1\Company\ABC Jobs in Progress\FT In Process 2014\32708-1\Original\32708-1.pdf' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
at ProofIntegrationService.Main.ProcessUploadedFile(String tempFilePath) in c:\Company\IntegrationServices\Job Integration Service\JobIntegrationService\Main.cs:line 814
The error does NOT happen every time -- maybe three out of 10 times. This script moves files basically all the time -- maybe 10 or so an hour. We never had this error on the old Xserve.
I have tried modifying permissions, propagating permissions and changing some other settings, but no luck. The directory to which the script writes currently has 29,000+ files in it, so I also wonder if that could be an issue.
I wonder if this is due to:
- SMB 3 issue
- RAID caching
- Permissions
Anyone have any thoughts? The client is about to simply move the storage to a PC server. That may be a solution, but I'd still like to know what is going on here.
Thanks,
Pete
Mac Pro, OS X Server, OS X 10.5 server