I use Linux and Mac OS X on a regular basis, and sometimes I have to use Windows. I need to use a flash drive on all three, and I need a filesystem that will work well on all of them. None of the ext's work on Mac or Windows, HFS+ doesn't work on Windows (or well on Linux), NTFS is read-only on Mac, and FAT sucks on all OSes. Is there a file system that would work reasonably well on all operating systems? I'd like it to work without drivers or additional installations, so it can be used on any computer.
File Systems Compatible with All Operating Systems – Comprehensive Guide
filesystemslinuxosxwindows
Related Solutions
There is a new dm target called "snapshot-merge".
If you format your USB flash memory as a LVM physical volume, and then locate your desired filesystem atop it in a logical volume, you can
- Activate a volume group containing your USB flash memory and another LVM physical volume on a local disk.
- Create a snapshot of the logical volume on the local disk.
- Mount the snapshot, do whatever you want with it, then umount it.
- Merge the snapshot back to the origin.
This should achieve close to what you've asked for, although it requires a scratch block device rather than a temporary directory.
Substitute the parts enclosed in {braces} as appropriate.
# Initial setup of the USB drive. pvcreate /dev/{USB} vgcreate {removable} /dev/{USB} lvcreate -n {base} -l 100%PVS {removable} /dev/{USB} mkfs -t {fs} {...} /dev/mapper/{removable}-{base}
# Initial setup of the scratch device. pvcreate /dev/{SCRATCH}
# Mounting the device. vgextend {removable} /dev/{SCRATCH} lvcreate -s -n {snap} -l 100%ORIGIN /dev/mapper/{removable}-{base} /dev/{SCRATCH} mount -t {fs} -o {...} /dev/mapper/{removable}-{snap} {MOUNTPOINT}
# Unmounting the device. umount {MOUNTPOINT} lvconvert --merge /dev/mapper/{removable}-{snap} vgreduce {removable} /dev/{SCRATCH} vgchange -a n {removable}
Untested, but all the LVM commands have manpages so you should be able to figure things out from here. You might need a vgscan
invocation in there somewhere, if the volume group doesn't get automatically detected when you plug the USB drive in.
What is likely happening is not that files are being corrupted but that Linux is doing its best to ensure that files are not corrupted.
When a filesystem is opened, written to, and is being closed, the operating system (both Windows and Linux) will mark the filesystem as being "dirty", e. g. not properly closed.
Under normal circumstances, when you unmount a filesystem, it will mark it as clean, presuming that all remaining I/O requests have been fulfilled, the filesystem's journal (if available) is empty, and all disk cache has been synced to the physical disk.
In some cases, the NTFS-3G utilities will simply not mark the filesystem as "clean" to ensure that it is checked by Windows at startup and avoid possible corruption.
In short, your hardware is probably fine, although it can't hurt to check the hard drive's health at any point. As far as actually sharing data back and forth, I would recommend a network-based storage method. Whether a locally-housed server or a push of the data into the cloud, using a network filesystem (probably SMB/CIFS for Windows compatibility) will ease the migration problems.
Best Answer
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.
UDF can be created on Linux with the tool
mkudffs
from the packageudftools
.