File system for Linux and Mac
November 21, 2022 7:41 AM   Subscribe

What is the best file system for formatting an external drive to work with both Ubuntu Linux and MacOS?

I have a desktop running Ubuntu 21.04 and a macbook with MacOS 12.3. I want to format an external drive for maximum compatibility between these two operating systems for sharing files (basically backing up large datasets generated on the Ubuntu machine to access on the mac while I am travelling). I have a 5Tb WD Passport (2.5 inch form factor).

I am reading that exFAT is the best file system for interoperability between linux, mac and windows. However, I have used that in the past and now that particular external drive doesn't load on my mac, which makes me think maybe it got corrupted due to lack of journalling?

Is there any file system with journalling that will work for these two systems - I don't mind installing a driver on the mac end but want to avoid macfuse if possible since this is a bit flakey in my experience.

Bonus points for something that would work on windows too (but not a deal breaker).
posted by piyushnz to Computers & Internet (8 answers total)
 
You could use NTFS — modern Linux supports it out of the box, and Mac can read it out of the box but requires a driver to enable write support. That would be kinda odd, since it's the Windows native format, but it might work well enough? I would be personally wary of it for a lot of reasons, but depending on what kind of bugs you feel like inviting into your life or could work. ExFAT is probably the only other reasonable option, since HFS+ doesn't work with journaling on Linux, and APFS requires a FUSE driver on the Linux side that's new enough I'd expect it to be full of bugs.
posted by wesleyac at 8:13 AM on November 21, 2022


Best answer: For large drives you are likely stuck with ExFat, and for smaller units are mostly still Fat32. If it's important data I haven't found a free solution that supports journalling on both OS's that I would trust. The Paragon NTFS Mac driver is 20$.

As for the issue you are experiencing with that unreachable drive? It probably isn't actually corrupted - this was very common when I was doing helpdesk, and there are a number of possible causes. My solution was to just pull everything off on and then re-format the drive on the Mac as it is fussier.

At some point you might consider network storage - then you aren't stuck on these filesystem issues. Of course this introduces new issues. I generally hate cloud solutions but this might be the best fit for you, or some sort of multi SSD that remains small enough to be portable.
posted by zenon at 8:26 AM on November 21, 2022


Best answer: Yeah ExFAT is what you want sadly. You can try just running fsck on the drive on Ubuntu and seeing if the Mac is happier with it. I've had lots of hard crashes when connected to ExFAT-formatted external drives and I've never had to fully reformat a drive due to a corruption issue.
posted by goingonit at 9:41 AM on November 21, 2022


Data point regarding ExFAT: I used it on an SD card for a while, mostly on Linux but occasionally on Mac and Windows machines. When there was a filesystem corruption issue I learned that you can't repair ExFAT partitions on Linux - the drivers just don't support it. I think the same is true for Mac. Eventually took the card to a friendly local computer repair person who was able to recover most of it.
posted by sibilatorix at 9:41 AM on November 21, 2022


Response by poster: Okay thanks all. I managed to repair my exFAT drive on MacOS using disk utility just now so I have a bit more confidence in it. I guess I'll just be extra careful when copying data not to disconnect. Maybe I'll add a cross-compatible file system with journalling to my Christmas list for Santa...
posted by piyushnz at 1:47 PM on November 21, 2022 [1 favorite]


When there was a filesystem corruption issue I learned that you can't repair ExFAT partitions on Linux - the drivers just don't support it.

I don't think that's the case, at least on modern Linux.

ExFAT is almost certainly the best solution for cross-platform compatibility of physical drives right now. It's not a great solution, but unfortunately there's no journaled filesystem that's as compatible, read/write, across all three major OS families.

So I'd use ExFAT but be very careful with it; treat it as you would a floppy in 1995. Copy files, wait for it to quiesce, unmount, make sure it detaches cleanly, only then disconnect. Don't ever pull it during a write and you probably won't have to make the acquaintance of any repair tools. That said, I'd only use it for short-term data transfer between systems.

In the long run, if you can get a network up between the Linux and Mac machines, that's probably the "right" solution, in terms of modern best practices. But there are certainly a lot of understandable scenarios (air gapped systems, geographic separation, etc.) where that's not possible.
posted by Kadin2048 at 7:30 PM on November 21, 2022 [1 favorite]


Indeed, I was misremembering exfat vs vfat fsck abilities, but luckily reality is catching up with my unsupported assertion!

Currently exfatprogs 1.2 (which includes corrupted-filesystem-repair functionality for fsck.exfat) is too new to be packaged in most distros given that it was just released under a month ago -- it's in Debian testing though! -- but in a few weeks you'll be able to repair exfat on linux.
posted by goingonit at 8:21 PM on November 21, 2022 [1 favorite]


I use zfs for this exact purpose but it's somewhat more hands-on in terms of management. I'm not really sure I'd recommend it, but you can get openzfs for all 3
posted by allium cepa at 1:49 AM on November 22, 2022 [1 favorite]


« Older It All Hinges on a Door   |   Suggestions on where I can run my dogs? Newer »
This thread is closed to new comments.