What filesystem can be easily shared between Linux and Macs?
August 24, 2005 1:59 PM   RSS feed for this thread Subscribe

Sharing hard-drives between Linux and Mac OSX (tiger). Which filesystem?

I'd like to share a hard drive between my Linux system and my PowerBook. I'd prefer to format the disk as ext2/3 or reiserfs, something that Linux systems are familiar with, but it's necessary that the PowerBook be able to read it when connected to a firewire enclosure.

I tried formatting the disk in Mac OSX as "Unix Filesystem" using disk utility, but I can't see any partitions when I hook it up to the Linux system. Likewise, I can't see anything on the ext2/3 drives when hooked to the Mac.

Are there any ext2/3 drivers for Mac OSX Tiger? If not, what are my options on the Linux side for reading something that a Mac spits out?
posted by odinsdream to computers & internet (18 comments total)
There are no good ext2 readers/writers for Tiger although the dev appears to be working on it. With Panther you can use that ext2fsx.

There is an hfsplus (mac native) driver for Linux. It works to some degree although you will need to get acquainted with some linux internals if you aren't already.

That's the best solution I can think of. The other is to partition the drive into two, one ext3 and one HFS+.
posted by neustile at 2:07 PM on August 24, 2005


I've got data on both these systems, and I'd like to write and read the drive in order to fill it with backup information before storing it off-site. It would be nice if I could do this in a non-quirky way.

When you say "linux internals," what do you mean?
posted by odinsdream at 2:12 PM on August 24, 2005


Well, if your kernel doesn't already have it installed (and it probably would have mounted if it did) you need to either recompile your kernel or compile a kernel module and then insmod it (check the README in the hfsplus driver source.) If you haven't done either of those things before it's possible but kind of a pain. And the driver itself is not perfect, for example the last time I used it (less than a year ago) there were no good hfsplus fsck tools, so if something happened (like the drive didn't unmount cleanly) it wouldn't mount anymore on linux because the "needs to be fixed" bit would be set and only OSX could clear it.

Just as a sanity check though, try
mount -t hfsplus /dev/sdXX /mnt/macdrive
or similar to make sure it's not already enabled.

Is it an intel linux? I know that recent PPC Ubuntu or Knoppix CD-boot installs come with the hfsplus driver installed and running (usually to grab files off of a broken OSX install.) Not sure if their intel counterparts also do.
posted by neustile at 2:24 PM on August 24, 2005


I'd go with FAT32, the lingua franca of file systems.
posted by kindall at 2:25 PM on August 24, 2005


Yes, FAT32 is also an option, which I should have mentioned BUT officially does not support partitions greater than 32GB or files greater than 4GB. Now, usually only Windows will refuse to format it greater than 32GB and should read it fine. I do not know off the top of my head if linux with generate a FAT32 FS that is over 32GB nor do I know if OSX will read one.
posted by neustile at 2:29 PM on August 24, 2005


That's an important point. It might be illogical, but I don't trust FAT for important data. The drive is 80GB, and I'd likely use 120GB or 200GB drives in the future. I may just end up reading the Mac disk data using Linux and writing it to another ext3/reiserfs drive.

I know I'll always be able to read an ext3 drive in the future, while I'm not so sure I'd be able to do the same with other filesystems.
posted by odinsdream at 2:37 PM on August 24, 2005


Honestly, it'll be a mess no matter what you'll do. The best way is networking (either NFS or SMB or something like rsync) and if that's not feasible for you the partition thing is the only real foolproof method. FAT32 might work short term though and won't need anything installed on either end at the moment.
posted by neustile at 2:47 PM on August 24, 2005


I do not know off the top of my head if linux with generate a FAT32 FS that is over 32GB nor do I know if OSX will read one.

yes ('mkdosfs -F 32' will do it) and yes -- I've done both with my iriver which is 40gb. also, osx is not terribly fast in mounting (~30-60s+) large fat32 partitions, nor in reading/writing them.

not wanting to trust fat is smart, good for you.

I've always wondered about the 'ufs' apple supports, that my mac-savvy friend always tells me never to use 'cos it has issues....
posted by dorian at 2:52 PM on August 24, 2005


I think neustile's suggestion of rsync might be the best (well, let's say most practical) answer. It's just such a pain to get networking stuff running smoothly, I guess I didn't want to face the obvious solution. Eh. Hopefully OSX plays nicely with NFS.
posted by odinsdream at 3:17 PM on August 24, 2005


Mac OS X's NFS support is fine, I've used it at the office over our VPN.
posted by kindall at 3:30 PM on August 24, 2005


I mount an ext3 linux volume via OS X's NFS support. It works fine. But that won't work for you, but I bring it up because of the following. When OS X uses this drive it backs up all the metadata that HFS+ has that NFS doesn't support as ._[file_name] files (I think it does resource forks, too). This, while better than losing the information, is a pain, as these files seem to be always marked dirty, and thus waste time in backups. I also think it was only in Tiger that the command line file utilities such as cp, mv, and rsync became aware of this metadata, so it is discarded in pre-Tiger OSs if a file is copied via command line to a non-HFS+ filesystem.

I think the same thing happens if copy HFS+ files to FAT16 or FAT32. So that is something to keep in mind with non-HFS+ filesystems.

I didn't realize that there was no EXT2 support in Tiger. Maybe I should donate some time getting the driver ported.

I'd probably be tempted to try the HFS+ Linux driver.
posted by teece at 3:31 PM on August 24, 2005


Is there a way to -not- copy the resource fork data when using rsync? I don't want it on the backup, if that's possible.
posted by odinsdream at 3:38 PM on August 24, 2005


In the version that comes with OS X, just leave off -E to discard metadata and resource forks. The GNU version of rsync (say from Fink) would discard it by default, as it has no idea what it is.

I am not a long-time Mac user, so I am not entirely clear on what all things use resource forks and metadata, but I think at the very least a font file is trashed if you don't copy the resource fork. And certain icon packages I have seen are really just empty files, with the actual icon as a resource fork. So make sure you'd not be throwing away stuff you need (also, Spotlight can be based heavily on filesystem metadata, so if you use keywords and labels and such, that would all be thrown away in your backup).
posted by teece at 3:47 PM on August 24, 2005


FWIW, I spent hours on this about a month ago, trying to share a Firewire drive between a journaled ext3 SuSE box and a 10.4 Server box. I gave up and went the network route.
posted by waldo at 8:14 PM on August 24, 2005


Thanks for the warning on fonts and such, teece. Most of these files started off on the Linux box as it is, so I'm not really worried about losing the forks. Thanks everybody for the advice, especially first-hand (waldo). Saved me some time and frustration, for sure.
posted by odinsdream at 8:43 PM on August 24, 2005


Also, yes... please work on the driver teece :-)
posted by odinsdream at 8:44 PM on August 24, 2005


you may have seen no disk partitions on the disk (esp. if Disk Utility set it up) because Apple uses a different partitioning scheme than PCs do. the Ardis thing linked to in the first reply may get that support for you, if not there's support in the kernel (you may need to load a kernel module or do a recompile to get it , though). AFAIK, UFS is an old, SysV-style file system, but I could be and probably am wrong on that.
posted by mrg at 9:01 PM on August 24, 2005


UFS is the Unix Filesystem; it's common among many Unix derived systems like the BSD's, Solaris and other big-name OS's. It's feasable that Linux might behave better with it, but I have little idea how mature either the HFS+ or UFS Linux implimentations are. I've seen suggestions UFS may be faster for some Mac things, and also that it can introduce other problems; maybe something to do with resource forks or so?
posted by Freaky at 9:54 PM on August 31, 2005


« Older We are having a big party next...   |   Is there an easy-to-use web in... Newer »
This thread is closed to new comments.


Related Questions
Catching that Intrepid Ibex November 9, 2008
I'd like a Preview.app replacement that won't... July 13, 2008
Make my Gnome OSX'y October 21, 2006
Help me choose a file server OS April 24, 2006
Linux for a web designer! Need advice of what... February 21, 2006