Cross-platform file system

86

35

I would like my external drives to be readable and writable from Linux, Mac OS X and Windows.

FAT32 works, but the 4 GB file size limit is a showstopper these days. Are there any alternatives?

Console

Posted 2009-09-22T14:05:44.287

Reputation: 2 552

Answers

46

As Breakthrough said, use NTFS. In both Mac OS and Linux, you can use NTFS-3G to enable read/write to an NTFS partition.

On OS X, NTFS-3G can also be installed through Homebrew for free with brew install ntfs-3g. You also need Fuse for OS X, but that's it.

These projects are free, open-source and mature. I've used this setup on a Mac and I've had no problems accessing data from an NTFS partition.

alex

Posted 2009-09-22T14:05:44.287

Reputation: 16 172

1@nagul, How would you know that you don't have any data losses? – Pacerier – 2014-11-23T09:45:17.667

Also consider that ntfs-3g has horrible performance given that it runs over fuse. – Avio – 2015-11-15T17:42:41.417

@Avio my answer is now 6 years old. I'm not sure how relevant it still is. – alex – 2015-11-16T05:21:11.060

1I would probably update this answer to mention exFAT, which is now supported on all major OSes pretty nicely. – slhck – 2017-09-22T09:40:03.877

24

A word of warning: Not all operations are supported by the ntfs-3g driver. http://en.wikipedia.org/wiki/NTFS#Linux "Due to the complexity of internal NTFS structures, both the built-in 2.6.14 kernel driver and the FUSE drivers disallow changes to the volume that are considered unsafe, to avoid corruption." I had the good fortune to experience this: My NTFS drive once froze in mid-operation. I finally unplugged it and reattached it, and ntfs-3g wouldn't touch it since then. I finally had to attach the NTFS drive to a Windows box and boot, then plug it back into the Linux box, to get it working.

– None – 2009-09-22T15:25:48.113

3Well, if you consider the ntfs format was all reverse-engineered, it's still pretty stable. Granted, it will probably still have a few quirks. Did you lose any data? – alex – 2009-09-22T16:20:16.290

3No, thankfully there was no data loss. It just irked me that I couldn't get the drive to work without attaching it to a Windows host first. I'd hoped that I could atleast force-mount the drive. I've since reverted to using fat32 when I need cross-platform compatibility, as I find the 4GB limit more palatable. But that's just me. I'll agree on the stability part though; I've never feared data corruption when using ntfs-3g. – None – 2009-09-23T10:39:25.173

4Also, NTFS is vastly unsupported or barely stable outside of the big 3. For instance, OpenBSD has sorta stable read-only support, but write-only is very unstable. I'm sure there are other OSs with the same problem due to it being a proprietary FS – Earlz – 2012-12-28T07:45:08.790

41

UDF is a candidate. It works out-of-the-box on linux >= 2.6.31, Windows >= Vista, MacOS >= 9 and on many BSDs.

Note: UDF comes in different versions, which are not equally supported on all platforms, see Wikipedia - Compatibility.

Related question: Using UDF on a USB flash drive

Marco

Posted 2009-09-22T14:05:44.287

Reputation: 4 015

It seems that Linux only supports UDF write up till version 2.05: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/fs/udf/udf_sb.h?id=v3.13#n11 :(

– Gerry – 2015-09-22T04:16:18.200

@Gerry It works here without problems: truncate -s 100M udf.img && mkudffs udf.img && mount udf.img /mnt && echo foo > /mnt/foo && umount /mnt && uname -r → 3.16.0-4-amd64 – Marco – 2015-09-22T05:04:11.613

@Marco I think he meant version 2.05 of UDF, not Linux – osvein – 2016-05-22T16:40:13.997

It looks like UDF is for optical media. Does it work for hard disks and SSDs? – Calmarius – 2016-06-24T18:35:39.977

@Calmarius Yes it does. Use revision 2.01 if you want to write on Linux. – Matt – 2017-03-16T00:46:23.160

According to Google, UDF is read-only for Chromebooks: https://support.google.com/chromebook/answer/183093?hl=en

– Jim Hunziker – 2017-08-09T18:30:27.223

3This seems to be the best method for me. It works on Windows, Linux, and Mac just fine. – Vortico – 2012-11-25T19:12:55.980

For best compatibility make sure you use the right formatting options, read this thread: http://serverfault.com/questions/55089/with-what-tool-should-i-format-a-hard-drive-as-udf

– MarcH – 2013-09-28T14:19:46.560

16

The simple answer is- no. There is no lowest common denominator across these OSes aside from FAT32.

By lowest common denominator, I mean built-in filesystems. For add-ons, you're on your own.

EmmEff

Posted 2009-09-22T14:05:44.287

Reputation: 1 277

UDF does not work for Chromebooks. See here: https://support.google.com/chromebook/answer/183093?hl=en

– Jim Hunziker – 2017-08-09T18:31:26.583

1It's not that hard to find alternatives :) – alex – 2009-09-22T14:33:06.567

11If one wants to plug the drive into an arbitrary compute, previously unconfigured, whether alternatives are possible is a moot point. – EmmEff – 2009-09-22T14:36:40.960

4UDF is the lowest common denominator. Except for embedded systems, all current PC OSes have built-in support for UDF – phuclv – 2013-10-24T00:33:10.037

10

try exFAT, which becomes available for more and more OSes. Accordings to the linked wikipedia article (see sources) there's an open source kernel module for linux in development. OS X supports it since 10.6.5, Windows supports it since Vista. There are updates for oler Microsoft OSes.

exFAT supports large files.

lajuette

Posted 2009-09-22T14:05:44.287

Reputation: 4 364

7exFAT isn't really available on Linux systems. – polemon – 2011-09-02T16:59:54.270

4

Actually it seems that exFAT has read/write support on Linux. You just can't create exFAT volumes. However I do not know how good the support is. At least its developers say that it is still in beta.

– None – 2012-08-27T08:45:53.527

9

Well you have two solutions. Many Linux distributions include tools for reading and writing to NTFS drives...

An alternative would be to use Ext2. There is a windows utility which integrates the filesystem with the Windows operating system. I think this would be your ideal solution:

It installs a pure kernel mode file system driver Ext2fs.sys, which actually extends the Windows operating system to include the Ext2 file system. Since it is executed on the same software layer at the Windows NT operating system core like all of the native file system drivers of Windows (for instance NTFS, FASTFAT, or CDFS for Joliet/ISO CD-ROMs), all applications can access directly to Ext2 volumes. Ext2 volumes get drive letters (for instance O:). Files, and directories of an Ext2 volume appear in file dialogs of all applications. There is no need to copy files from or to Ext2 volumes in order to work with them.

Breakthrough

Posted 2009-09-22T14:05:44.287

Reputation: 32 927

That would be a nice solution is OSX could natively support Ext2. But using Ext2, AFAIK, would mean that you have to install a driver on Windows and Fuse on OSX. – Rolf – 2018-04-11T16:41:24.430

4Valid solutions if one can and is willing to install these third-party tools on the target machines. – EmmEff – 2009-09-22T14:55:39.837

7

Mount your external drives to a server with NFS and Samba.

Will

Posted 2009-09-22T14:05:44.287

Reputation: 820

4

FAT32 is something that you can be sure of to work almost anywhere.

I struggle from the file size limit, which by today's standards isn't that large anymore. Since exFAT isn't available on Linux yet, I was looking for alternatives, and it's really hard to find something suitable.

UDF was once meant to be a cross platform and cross media filesystem, but it kinda got forgotten. There is an option to format UDF for hard drives, which is quite suitable for removable drives, but from what I experienced, support on Windows is minimal, if at all. I don't know if Windows 7 supports UDF drives other than BluRay discs.

I settled on using NTFS for my external drives, that need to be plugged in into Windows computers, as well as Linux computers. For my removable drives, that are mainly, if not only used on Linux computers, I use XFS.

The same problem applies to encryption as well: I use LUKS on Linux, which has some support on Windows. TrueCrypt can't be integrated into Linux systems too well, compared to LUKS, so I settled on that one.

polemon

Posted 2009-09-22T14:05:44.287

Reputation: 2 531

1

UDF now works (Windows 7). See http://serverfault.com/questions/55089/with-what-tool-should-i-format-a-hard-drive-as-udf

– MarcH – 2011-12-30T00:01:40.210

1

If your cross-platform requirements do not include Windows my understanding is that ZFS is the best option for popular modern operating systems in wide use as of late 2017. See the OpenZFS implementation which includes support for OSX/macOS, Linux, FreeBSD: https://en.wikipedia.org/wiki/OpenZFS http://www.open-zfs.org/wiki/Main_Page

It should be possible to use Windows through a virtual machine (or another resource) but my needs are met without Windows.

jimmont

Posted 2009-09-22T14:05:44.287

Reputation: 121

0

I'd suggest the use of exFat file system because I formatted a 120GB Harddisk partition with exFat and it works perfectly with macOS, Linux, and Windows.

Adarsh Srivastava

Posted 2009-09-22T14:05:44.287

Reputation: 1

3

This was already mentioned in 2011, https://superuser.com/questions/45130/cross-platform-file-system/253677#253677, with more details.

– Arjan – 2017-09-08T16:05:28.050

-3

To be honest, there is no file system like that. NTFS is read/write mode for Linux/Mac but it is not advisable for Linux installation. In fact, I didn't see anyone installing Linux on NTFS. Linux is usually installed on ext2/ext3 filesystems. FAT32 may work right now, but future releases of Windows like with Windows 7 will not work.

You can read/write on the Linux partitions while working on Windows using some of the softwares/drivers mentioned here.

http://www.helpfolder.com/2009/08/27/how-to-access-linux-partitions-from-windows/

Mahesh

Posted 2009-09-22T14:05:44.287

Reputation: 430