Forum Discussion
Weird Storage Migration Service Error (Failing after 45gb)
- Oct 26, 2022
So interestingly I was able to figure this one out after a few more hours of digging around, in this case it was going back through the SMS-Proxy debug eventlog as this contained a log for each file copied I was able to trace the errors back to the file that triggered it all:
10/26/2022-10:21:06.511 [Erro] Transfer error for \\server.domain.com\E$\Data\Share\Folder\CON.CSV.CSV: (2) Failed to get file handle. Stack Trace: at Microsoft.StorageMigration.Common.FileDirUtils.OpenFile(String fileName, DesiredAccess desiredAccess, ShareMode shareMode, CreationDisposition creationDisposition, FlagsAndAttributes flagsAndAttributes) at Microsoft.StorageMigration.Proxy.Service.Transfer.CopyEngine.StreamTransferInfo.OpenTargetHandle(String fileName, Boolean openForReadonly) at Microsoft.StorageMigration.Proxy.Service.Transfer.CopyEngine.OpenStreamHandles(Boolean openForReadonly) at Microsoft.StorageMigration.Proxy.Service.Transfer.CopyEngine.InitializeDataStreams(Boolean openForReadonly) at Microsoft.StorageMigration.Proxy.Service.Transfer.CopyEngine.CopyAllStreams() at Microsoft.StorageMigration.Proxy.Service.Transfer.CopyEngine.StartCopy() at Microsoft.StorageMigration.Proxy.Service.Transfer.CopyEngineBase.CopyData() at Microsoft.StorageMigration.Proxy.Service.Transfer.FileTransfer.Transfer() at Microsoft.StorageMigration.Proxy.Service.Transfer.FileTransfer.TryTransfer() [d:\os\src\base\dms\proxy\transfer\transferproxy\FileTransfer.cs::TryTransfer::63]
Despite the Transfer Error log in SMS being empty it does seem like it was a file that caused the issue all along since CON is a reserved "special" name it looks like this was tripping SMS up (this particular folder gets data uploaded into it via FTP from our ERP system which explains how the filename was created I think).
https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#file-and-directory-names
The fix here was to rename the file, trying to rename it from the server directly errored but renaming via a network share from another server worked fine, I was then able to restart the SMS transfer and it worked (I've still got a few more permission errors to fix but that is easy enough compared to this!).
So interestingly I was able to figure this one out after a few more hours of digging around, in this case it was going back through the SMS-Proxy debug eventlog as this contained a log for each file copied I was able to trace the errors back to the file that triggered it all:
10/26/2022-10:21:06.511 [Erro] Transfer error for \\server.domain.com\E$\Data\Share\Folder\CON.CSV.CSV: (2) Failed to get file handle.
Stack Trace:
at Microsoft.StorageMigration.Common.FileDirUtils.OpenFile(String fileName, DesiredAccess desiredAccess, ShareMode shareMode, CreationDisposition creationDisposition, FlagsAndAttributes flagsAndAttributes)
at Microsoft.StorageMigration.Proxy.Service.Transfer.CopyEngine.StreamTransferInfo.OpenTargetHandle(String fileName, Boolean openForReadonly)
at Microsoft.StorageMigration.Proxy.Service.Transfer.CopyEngine.OpenStreamHandles(Boolean openForReadonly)
at Microsoft.StorageMigration.Proxy.Service.Transfer.CopyEngine.InitializeDataStreams(Boolean openForReadonly)
at Microsoft.StorageMigration.Proxy.Service.Transfer.CopyEngine.CopyAllStreams()
at Microsoft.StorageMigration.Proxy.Service.Transfer.CopyEngine.StartCopy()
at Microsoft.StorageMigration.Proxy.Service.Transfer.CopyEngineBase.CopyData()
at Microsoft.StorageMigration.Proxy.Service.Transfer.FileTransfer.Transfer()
at Microsoft.StorageMigration.Proxy.Service.Transfer.FileTransfer.TryTransfer() [d:\os\src\base\dms\proxy\transfer\transferproxy\FileTransfer.cs::TryTransfer::63]
Despite the Transfer Error log in SMS being empty it does seem like it was a file that caused the issue all along since CON is a reserved "special" name it looks like this was tripping SMS up (this particular folder gets data uploaded into it via FTP from our ERP system which explains how the filename was created I think).
https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#file-and-directory-names
The fix here was to rename the file, trying to rename it from the server directly errored but renaming via a network share from another server worked fine, I was then able to restart the SMS transfer and it worked (I've still got a few more permission errors to fix but that is easy enough compared to this!).