ZFS + OS X

I use OS X as my primary operating system. Since December 2008, I've been using ZFS for keeping my data safe. Here's some disorganised notes which may or may not be useful for people considering this system.

ZFS is read-only on OS X by default. Get the latest version from Mac OS Forge.

This implementation isn't fully integrated with the OS X interface yet, but it's still very usable if you're comfortable with the command line. You'll also need to RTFM, lest ye be plagued by kernel panics. Make sure to read the getting started guide and the ZFS FAQ.

See also: my ZFS bookmarks on Delicious.

My setup

$ diskutil list
...
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *931.5 Gi   disk1
   1:                        EFI                         200.0 Mi   disk1s1
   2:                  Apple_HFS PipBoy                  751.5 Gi   disk1s2
   3:                  Apple_HFS Paranoia                179.6 Gi   disk1s3
...
$ diskutil eraseVolume ZFS %noformat% /dev/disk1s2
Finished erase on disk disk1s2
$ diskutil list
...
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *931.5 Gi   disk1
   1:                        EFI                         200.0 Mi   disk1s1
   2:                        ZFS                         751.5 Gi   disk1s2
   3:                  Apple_HFS Paranoia                179.6 Gi   disk1s3
...
$ zpool create pipboy disk1s2
$ zpool upgrade
This system is currently running ZFS pool version 8.

The following pools are out of date, and can be upgraded.  After being
upgraded, these pools will no longer be accessible by older software versions.

VER  POOL
---  ------------
 6   pipboy

Use 'zpool upgrade -v' for a list of available versions and their associated
features.
$ zpool upgrade -a
This system is currently running ZFS pool version 8.

Successfully upgraded 'pipboy'
$

Mounting and unmounting

To mount or unmount a zpool, use the zpool import [pool_name] and zpool export -f [pool_name] commands, respectively. Do not try to unmount/eject the volume like you would any other volume in OS X (I got my first kernel panic this way).

I use the following aliases in my .bashrc file:

alias zim='zpool import' zex='zpool export -f'

Bugs/oddities

Finder

Time Machine