5

For a USB drive I'm looking for a file system (and/or fs creation options) that

  • can be mounted without third-party drivers on both a current OS X (>= 10.7.x) and a recent Linux kernel (say stock Ubuntu 12.10)
  • with write support
  • supports as much Unix semantics and metadata as possible (symlinks, hardlinks, time stamps, Unix permissions, ownership)

Is this feasible? It seems like FAT is the safest bet in terms of compatibility but of course it doesn't do Unix permissions. NTFS seems to be read-only on OS X and doesn't support Unix permissions (and I'd be scared of conflicts in two reverse-engineered interpretations of NTFS). The Linux ext* file systems only work with extra drivers on OS X. HFS+ support in Linux seems to be not quite stable (or is it totally stable after turning off journaling?) Since the Mac is BSD-based I'd guess some variant of UFS should work on both platforms?

Clarification: I do not intend to mount the USB drive simultaneously on two computers (this would be somewhat hard to pull off via the USB interface anyhow, wouldn't it?)

3 Answers 3

3

Have you considered UDF, as POSIX compliant and supported by almost every device around? There's also plenty of help around e.g. Using UDF on a USB flash drive.

Alternatively you could have a look at ZFS, as there are kernel modules, with RW support, for both OS X and Linux?

1
  • UDF seems like the perfect solution, thanks! (ZFS seems overly complex and only marginally supported on both Linux and the Mac.)
    – Hein
    Jan 7, 2013 at 0:59
0

Unless you are using a filesystem type that is designed for multiple system access, your efforts are going to result in a destroyed un-recoverable fileystem. Locally mounted file systems like NTFS, ext[234], and the like REQUIRE and ASSUME that only one system is using it (read OR write). The main reason is that the local host caches some necessary items and your other system will not be in-sync to get these changes. For example, changes to the allocation table, very important not to have two systems allocating the same blocks.

The only type of filesystem that allow shared access are NFS and possibly CIFS, where these fall under a client/server type of operation.

I'm sure that there are other file systems that might be able to do what you ask out there but its not something you are going to normally see and will require some moderately extensive configuration and testing to verify operations.

1
  • 1
    Thanks for your input :-) Yes I agree that mounting the same drive simultaneously on two machines is tricky and I clarified my question to exclude that -- I'm only looking for a format that can be mounted at different times on either OS X and Linux.
    – Hein
    Dec 31, 2012 at 19:02
0

If you consider UDF, note that it is a little sticky to format it on linux, and that it can be very difficult to get windows to recognize a UDF formatted drive. Mac, apparently, recognizes UDF well.

It is better to use the entire drive as UDF, and not partition it up. Actually, UDF does not use partitions. Use the following commands to zero the MBR, make the UDF file system, and mount it:

 dd if=/dev/zero of=/dev/sdx bs=512 count=1
 mkudffs --media-type=hd --blocksize=512 /dev/sdx
 mount -t udf -o bs=512 /dev/sde /media/udf

See this question for more detail.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .