Common file systems between Mac OS X and FreeBSD

I'm installing FreeBSD on my desktop, and have a macbook pro with OS X on it, and an external drive that I'd like to use on both of them. From what I've read, there is no HFS support at all in FreeBSD (if anyone would care to prove me wrong, I'd be quite happy) which strikes me as kind of odd, someone needs to port it over from NetBSD.

With my preferred choice out of the running, I'm down to the following:

ZFS (The random kernel panic bits on the ZFS freebsd page freak me out)
Apple UFS (Is this supported in FreeBSD, if so that would be great)
ext2 (not sure how good the FreeBSD ext2 support is, or the thrid party mac os one, anyone care to enlighten me?)
NTFS (ewww, but I may have to go with it in the end)
FreeBSD UFS (dont think this works at all in mac os x)

FAT isn't an option because I have lots of files larger than 4 gigs.
 
ZFS on 32-bit FreeBSD is fine with tuning if you've got enough RAM (ideally, 2GB +), and effortless on 64-bit FreeBSD. However, I'm not sure how well ZFS works across the OSes, I've seen some people have some issues.

For HFS, there's emulators/hfs and emulators/hfsutils, though I don't know how well these work.

The ext2 support in FreeBSD feels fine - I've compiled, installed and booted the FreeBSD base system on ext2 recently. (I was wondering if you could theoretically run FreeBSD on ext2. It seems doable, though silly.)
I can't say anything about the MacOS X tools, though - I don't have any Macs.

I've copied a lot of files from NTFS on FreeBSD, but that's also where my experience with it ends. That worked, though.

As for UFS, it depends on if they're using a NeXT-derived UFS or a FreeBSD version. I don't know.
edit: It seems UFS on Macs is stored big-endian even on little-endian hardware (like, ooh, i386 and amd64) - FreeBSD doesn't handle this well.
And Macs dont seem to handle FreeBSD UFS either. How annoying.
 
I haven't tested this myself, but I've got the impression it's much less picky on a 64bit system - in other words, I would expect it to be completely stable.
 
I have a dual-boot setup with FreeBSD and MacOS-X now.

Some details:
FreeBSD 7.2-STABLE Jun/21 2009
MacOSX 10.5 + zfs from zfs.macosforge.org

First, there is the zpool version: The MacOS version of zfs supports version 6, so on FreeBSD, the pool has to be created like this:

[cmd=]zpool create -o version=6 tank ad0p3[/cmd]

Rebooting into MacOS-X, that pool can be imported, but you will get a warning, that the pool is in use by another system. This is the first issue (ZFS is not intended for sharing pools between systems). So force import it:

[cmd=]zpool import -f tank[/cmd]

Another issue is with removable drives on FreeBSD. With ZFS on a USB drive (umass), I have a lot of error messages that the "synchronize cache" command is not supported. I don't know if it is an issue with FreeBSD's umass driver, or a limitation of USB drives in general. Anyway, I don't think it is OK to use ZFS on a USB drive on FreeBSD (also, ZFS is not designed for removable media)

Although, ZFS was not originally designed to do these things, it is clear that we all need a "full-featured" filesystem (unix permissions, acls, extended attributes, case insensitivity, no fsck) in order to share data between different operating systems. Unfortunately, ZFS is the only filesystem that has all these features (and more).
correct me: does today's HFS has full extended attributes support?

Anyway, now I have a third problem: I can access all data on the pool in MacOSX after importing it, but if I add data with MacOSX and reboot into FreeBSD, only root can access the data (no matter which permissions). I think this must have to do something with ACLs, which are not supported on FreeBSD right now.

Any ideas?
 
Regarding the permission problem - which user do the files seem to belong to as seen from FreeBSD?
 
They belong to uid 501. My userid in MacOSX is not known to FreeBSD.

So I tried to change the owner, group and permissions (reset everything recursively in FreeBSD), but it didn't change anything.

I could try to change permissions in MacOSX, and see if it has any result.
 
bb said:
They belong to uid 501. My userid in MacOSX is not known to FreeBSD.

So I tried to change the owner, group and permissions (reset everything recursively in FreeBSD), but it didn't change anything.

I could try to change permissions in MacOSX, and see if it has any result.
Probably what you're wanting to do is to reinstall one of the OSes and then set the UID to be the same between the two. 501 isn't one which is used by anything in FreeBSD as far as I can tell.

Otherwise, you can probably fire up vipw and give yourself that UID. Just don't forget to go through your /home and adjust the rest of it to match. I wouldn't adjust things outside of the user dir, because I don't think that they typically should be under the UID of the user.
 
hedwards said:
Probably what you're wanting to do is to reinstall one of the OSes and then set the UID to be the same between the two. 501 isn't one which is used by anything in FreeBSD as far as I can tell.

Otherwise, you can probably fire up vipw and give yourself that UID. Just don't forget to go through your /home and adjust the rest of it to match. I wouldn't adjust things outside of the user dir, because I don't think that they typically should be under the UID of the user.

Of course it is good to synchronize the uids. Same thing when working with nfs. But I cannot even list directory contents, no matter which permissions, owner or group I assign to the data.

Finally, I think the ZFS code for MacOS-X is not in a usable state at the moment. At least not for writing data to a ZFS file system.

But I will never use N*T*F*S !
Using MacOS-X is not too important for me anyway. I do everything with FreeBSD;
 
Back
Top