3 Edge Cases of Various Failures
Sometimes you just encounter some very edge, deeply nested, unknown-origin errors, and the surface error message cannot really help you. We don’t have the time to get ourselves a CS degree, but you have to solve those errors, because so is life.
3.1 Failure in copying files (Windows, NTFS drive, files likely written by Unix-like OS)
3.1.1 Symptome
- OS: Windows
- Source & Destination file system: both NTFS drive
- Action: copying
movfiles (ROV recordings) from one drive to the other drive.
The core error message is “file name invalid or too long” or whatever that sounds like this. Drag’n’drop in file explorer throw this error, 7-zip File Manager, robocopy and copy /B too. Restart, change machine didn’t work. In my case, using the latter tools has thrown a slightly different error messages (German) from Windows, which might come from a little deeper level: “Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch.” robocopy report also tells you the error code 123 (0x0000007B).
3.1.2 Cause
Unix-Windows fight. Windows doesn’t like Unix-like alt stream, which seems to be used by ROV system to store metadata. There were some characters in the alt streams of some files that Windows doesn’t like, so the copy crashes at a very deep level within Windows. This is my guess: the ROV likely used Unix-like system (they are open source, and there were some characteristic phantom files in the drive) so they could write Unix-like style files on an NTFS drive without problem, but when I tried to mirror the drive on Windows those time bombs went kaboom.
3.1.3 Solution
Use /COPY:DTX flag in robocopy. /COPY:X let you skip all alt streams. When other uncorrupted files were already copied, supply with source and destination folder and /E /COPY:DTX /XJ /XC /XN /XO flags to only copy those corrupted files.
Or, follow the industry standard for file storage. What I learned from Schmidt Ocean is that use a NAS to store all ship data, end of discussion. Let the NAS interface manage cross-platform conflicts, and once they are stored on the NAS, the end user never needs to touch the hard drive directly again, not to mention all the other data security and safety features natively come with a NAS.
Of course, investing a NAS can sometimes introduce bureaucracy and logistic difficulties. But it is still a very advanced and sophisticated data archive solution, both in short and long-terms.