Notes on ExFAT and Reliability (2021)
pawitp.medium.com
pawitp.medium.com
I use ZFS on SD cards and USB memory sticks when I am able to, and the number of checksum errors are ... not rare. Even for high-quality NVMe SSDs on (lower quality) USB-NVMe bridge controllers, corruption everywhere.
Every expense has been spared - I wouldn’t trust these things at all unless you are using one of the more expensive SSD devices or something certified for Windows ToGo, etc.
Good written data (not corrupted while being written) will last a long time, probably more than any magnetic media, so data resiliency is good.
Are you meaning generally any kind of solid-state storage here?
Flash storage will not last as long as magnetic media. You've got 50 years, tops, and even then it requires some luck to not have any bit rot.
Which magnetic media lasted 50 years? I don't belive HDDs from the '70s are readable today.
I tried to read a QIC-120 last year (2021). The tape was dated 1992 (I think), so it was almost 30 years old. The tape jammed inside the cartrige.
If you don't need to interoperate with Windows then you have many better choices.
Are the filesystems choices mare varied if you need to operate with MacOS?
Whenever my dad brings me one of his FAT32 USB drives with "issues", I find a bunch of hidden dot files and folders that were not there before and realize it's been plugged in a Mac.
I really would like to know what MacOS does to USB flash drives.
Windows actually does almost the same thing. Thumbs.db etc. And it also creates shadow files for those with metadata when saving to FAT32. You just don't see them on windows as they are hidden, just like dotfiles are on macOS.
And what metadata do you mean? Permissions and alternate streams get purged, don't they? What else is there? You have to go out of your way to get a desktop.ini and those are just as obtrusive on NTFS.
Long file names are stored in a weird way but that's very standardized and doesn't make extra files.
I forget the name but I believe it's the filename prepended or appended with an underscore.
PS: On Mac you can turn it off with a simple defaults write command. Of course it also means that metadata changes won't be persisted to such files. Not sure about Windows.
And I think you misread my NTFS mention. That was only in the context of desktop.ini, and desktop.ini only happens if you go through a specific obscure menu.
But I can tell you that prepending filenames with ._ is a Mac thing.
I can appreciate that's true if the client systems are not under your control, but if you have influence over all systems that will touch the drives, I've had good experiences with OpenZFS which has drivers for all 3 major OSes: Linux, macOS, Windows
One just needs to be cautious not to use bleeding-edge features because the ZFS release cycles differ, but otherwise so far it has done fine for me
If it is your own computer, then you either are a Windows user or you prefer other operating systems, in which case you would wipe Windows and install something else. In both cases you do not need to transfer data between operating systems, so you can use on external memories NTFS for Windows or XFS, ZFS etc. for Linux.
That fits me, if it's inclusive or. Windows is a pretty OK desktop environment, and mostly gets the better tested mass market software. On the other hand, I prefer other operating systems for doing "real work". I don't usually need to transfer data via external storage though, but if I did, I might consider installing a filesystem driver/tool on my Windows machines to have a better time of it. OTOH, I might just use par2 or something on top of a readily available filesystem.
I think that implementation bugs are the cause for most errors. This is not a popular filesystem used in datacenters, so testing would be minimal by comparison.
Is that only using Microsoft's tooling, or did you try ntfs3g from a Linux boot stick? I am grateful that I've never tried to recover borked NTFS, but my mental model is those utilities have explored more "off the beaten path" than Microsoft may want to bother with. And, in the worst(?) case, you can patch the utilities to do any kind of extra debugging you may need
https://www.kernel.org/doc/html/latest/filesystems/ntfs3.htm...
This is not my experience. Had many times chkdsk repair a corrupted NTFS just fine. Even when by mistake overwrote (run r/w badblocks detection) part of the partition, testdisk could recover data.
...based on author's guesses based on the data structures, not anything actually tested
P.S.: it still has that Y2100 hard limit in dates, I can't believe that MSFT haven't solved that one especially that it was created in 2001.
Made me smile :) I remember this particular message, from the time when Flip destroyed my disk.
Also, I'd like to see file systems with cryptographic hashes for protection instead of checksums.
Surely these would be extremely useful for long-tem storage formats?
That's why these days I always use BitTorrent, because it uses cryptographic hashes (albeit the outdated SHA-1) and I'm therefore guaranteed that every bit is identical to the source.
Well, and also TCP/IP checksums are small enough that you'll relatively frequently see errors sneak through them. But that's not likely to be what you were noticing.
Probably also using cheap/old network equipment too that would bit-flip between when the TCP/IP checksum was recalculated. And like you said, combined with the re-publishing of corrupted files if they didn't bother to par2 correct them first (ie., human errors creeping in :)
> Surely these would be extremely useful for long-tem storage formats?
I suspect most people... well, most people just live with bit-rot, but the second best option is to use dumb storage and just stick a *.sha256 and maybe some par2 files next to the original data file on whatever storage you're using. Maybe even a detached GPG signature, if you care about that.
This isn't true. See: https://mounty.app/
I do have to ask the idiot question that you are sure you formatted the drive as ExFAT and not FAT32?
[1] https://learn.microsoft.com/en-us/windows/win32/fileio/exfat...
And fsck.exfat didn't fix it so I had to spin up a windows just for that :S
It does show that journalling is really not a convenience anymore but a must-have IMO. Though NTFS is not a good alternative.
The problem is that with all the caching that occurs, writes do not happen in this straightforward way unless the cache is completely flushed at each point. Even getting cached flushed is not straightforward because most drives cache and some ignore cache flushes to increase performance.
Ideally there would be a better, universal file system but I believe it is the best we have at this point.
I haven’t had any issues with data corruption personally. Your mileage may vary.
I can't nail the problem down exactly, but it appears to me that if you delete files [using the macOS FS drivers] then it may also overwrite other, random blocks on the disk.
1. After each “write session” to an ExFAT volume, open Terminal and type “fsck_exfat -d disk<dnumber>s<snumber>” where <dnumber> is the disk number and <snumber> is the partition number of your ExFAT volume 2. Avoid deleting files on ExFAT volumes using a Mac!