my tildelog

a blog about tildes

Don’t trust ExFAT with your data

August 11, 2021 — ~rawktucc

I have a couple personal anecdotes on why you shouldn’t trust ExFAT as the filesystem for your valuable files. Let’s say you have a drive to share some personal files with family and friends. The files are large, and the recipients all use different systems, so ExFAT is the best choice because:


Windows

  • Windows 10 does not seem to like drives that are NTFS formatted with mkfs.ntfs. I’ve never had success giving a drive formatted that way to someone; only after formatting through a Windows machine were they able to read the data.
  • Windows cannot open EXT2 / 3 / 4 natively; there are plugins but it’s not user-friendly as plug-and-play.

MacOS

  • MacOS can open NTFS partitions as read-only, meaning no data can come back if there is any.
  • MacOS cannot open EXT2 / 3 / 4 natively; again like Windows, plugins both paid and free exist but they are not user friendly as plug-and-play

GNU/Linux

  • Linux CAN open EXT2 / 3 / 4 natively, and most popular distros include ntfs-3g or a similar FUSE system to mount NTFS drives; however, many do not include ExFAT related tools or utils, but my assumption is that you’re using Linux so you’d probably install exfat-utils and exfat-fuse anyway…
  • FAT based filesystems have size limits beyond 4GB… not ideal for some use cases.

So in the end, ExFAT can be read by any of the three major OSes (and I’m sure BSD too, I don’t know anyone in my friend or family circle using it though). This makes it the most desirable for easy file sneakernet filesharing.

However, the catch here is that ExFAT filesystems are very sensitive, as ExFAT does not use a journaling system like NTFS or EXT3/4

Some light reading on exfat stability and recovery (sysnative.com) (Archived copy)


On with my anecdotes…

Situation 1.

  • Brand new SSD, big files to share. Format as ExFAT because I’m not sure if the recipients have Macs or Windows PCs; I know they don’t use Linux.
  • They call me and say they can’t see any files. They see the activity light go up, but no drive appears.
  • Returned back to me, I attempt to mount with exfat-fuse and get an error message relating to an “invalid checksum”
  • I run fsck.exfat on the drive, which fixes the mount. However now I don’t know if my data is fully intact; i know it is on my source file storage, so I run a new copy again.

Situation 2.

  • Dual 8TB 5900RPM HDDs in enclosures, my earlier datahoarder setup. Data was mirrored from source systems to both drives; source systems were mainly Windows based and all on a personal level
  • One day during the copies, everything froze. Copy programs were non-responsive, drives had no activity, but everything else on Windows worked fine.
  • Waiting several hours for activity, I decided to pull power and reboot the drives.
  • Upon reboot, one of the mirrored drives did not return to life; Windows prompted me to reformat.
  • The rest of that memory is hazy but I most likely reformatted to NTFS, before eventually consolidating my drives into a bigger system, under EXT4.

Realistically you should always have proper backups (jwz.org), but maybe reconsider using ExFAT.

tags: exfat, linux, windows, macos, datahoarder