ZFS on Mac OS X 10.5
Friday, January 4th, 2008Have you ever seen a Drobo? Cool stuff, eh? Yes, if it werenât be USB only (letâs be honest, it sucks), therefore had a limit of 2 TeraByte per Volume and used some kind of proprietary âSAFEâ algorithm (âitâs like RAID.5, but betterâ). No thanksâŚ
Hey, Iâm a geek, I can do this on my own, canât I? - So letâs start againâŚ
Have you ever seen ZFS? Cool stuff, eh?Yes, if it didnât run primarily on Solaris and FreeBSD (sorry, too much stuff to learn at the same time). Linux, well, yeah, userspace⌠you wouldnât want that, would you?
Fortunately, Apple (well, yeah, most likely Steve âthe dictatorâ himself) decided to like ZFS and to port it to OS X. It wasnât ready in an Apple-kind of way for 10.5, but itâs available for developers, which I am not, but Apple doesnât know that.
Installation:
It sucks. There is a pkg installation file in the developer connection, but it only runs on 10.5.0. So, after some screwing around with pax (seriously, who wrote that man page, and what is a member of an archive file?!), I was able to extract zfs.kext (if google is your friend, you might be able to find Shawn Ferryâs documentation on how to do that). Victory is mine!
Playing around:
I wouldnât want to bore you with the umptiest description on how to create a pool - the PDF âZFS on Mac OS Xâ from Apple says it all and is a very good start (thanks Chris). Letâs just say I had two hours of fun creating pools, making snapshots and clones and swapping disks.Some additional reading:
- Johnâs Cool Things - ZFS
- Will Greenâs ZFS Tutorial
- Solaris ZFS Administration Guide
- ZFS Best Practices Guide
Critics:
Well, my first plan was to rebuild a Drobo. Unfortunately, ZFS does not yet allow you to add an arbitrary amount of disks to a RAID.Z. The possibility to substitute every disk in a RAID.Z with a bigger one and afterwards just using the additional space is nice, but definitely not the same. A friend of mine suggested to use a stripeset of disks as one or more parts of the RAID.Z, which would give me at least the possibility to use all the 120, 160, 200 and 250GB disks lying around, but:
Oh come on, whereâs the fun in ZFS if you canât do something stupid?
The OS X implementation is⌠well, yes, Beta. A source at Apple told me the data is stored ârock solidâ, but I might have some kernel panics to get it there and from there. Itâs not that bad, at least itâs predictable what you shouldnât do to avoid kernel panics (primarily: do not unplug (even unmounted) ZFS devices), but you can see that it is not yet integrated in the rest of the system:
- The mounted volume has
drwxr-xr-x root:sys
- The Finder canât use the Trashcan on ZFS volumes. Everything gets deleted at once.
zfs umount
doesnât work most of the time. Surprisingly, dragging the volume in the Trashcan does?!- The afp share names for pool and filesystems are just the poolname plus an increment:
afp://192.168.0.103/data
afp://192.168.0.103/data1
afp://192.168.0.103/data2
Funnily enough, unmounting and remounting filesystems results in higher increments:
afp://192.168.0.103/data3
afp://192.168.0.103/data4
afp://192.168.0.103/data5 - SMB, on the other hand, doesnât show the filesystems at all. But, if the filesystems are mounted inside the pool, it is shown as a directory
- Does compression work? It seems so, but a 30MB file consisting of zeroes takes either:
30MB (ls -la
),
1MB (zfs list
) or
1KB (31.817.728 bytes) (Get Info on SMB-mount).
Unfortunately,zfs get all
still says:compressratio 1.00x
- to be continued