I've installed ZFS on my Mac!
*data compression at lower levels
*mitigate bit rot
*Time Machine only on HFS+
One reason I thought to check-in on the current state-of-the-art of ZFS on Mac is that I personally share the general consensus & frustration that Apple's Time Machine is so conceptually elegant...at the cost of being so tech-locked to the increasingly crufty HFS+.
*general peace-of-mind
Download http://code.google.com/p/maczfs/downloads/list. As of this writing, v74.3.0 was the "stable" stable (no "b" in the PKG name).
Time for some reconnaissance. I extracted to a new folder: ~/Downloads/extractedfrommaczfsv74/.
reg$ pkgutil --expand ~/Downloads/MacZFS-74.3.0.pkg ~/Downloads/extractedfrommaczfsv74
Or use something like Unarchiver or Pacifist to get at the guts.
Then the tutorial tells me to look at the Bill-of-Materials.
reg$ lsbom ~/Downloads/extractedfrommaczfsv74/MacZFS-74.3.0/zfs106.pkg/Bom
. 40755 0/20
./System 40755 0/0
./System/Library 40755 0/0
./System/Library/Extensions 40755 0/0
./System/Library/Extensions/zfs.kext 40755 0/0
./System/Library/Extensions/zfs.kext/Contents 40755 0/0
./System/Library/Extensions/zfs.kext/Contents/Info.plist 100755 0/0 1048 37069802
./System/Library/Extensions/zfs.kext/Contents/MacOS 40755 0/0
./System/Library/Extensions/zfs.kext/Contents/MacOS/zfs 100755 0/0 1125248 452352466
./System/Library/Filesystems 40755 0/0
./System/Library/Filesystems/zfs.fs 40755 0/0
./System/Library/Filesystems/zfs.fs/Contents 40755 0/0
./System/Library/Filesystems/zfs.fs/Contents/Info.plist 100644 0/0 1672 2877533206
./System/Library/Filesystems/zfs.fs/Contents/PkgInfo 100644 0/0 8 3475506705
./System/Library/Filesystems/zfs.fs/Contents/Resources 40755 0/0
./System/Library/Filesystems/zfs.fs/Contents/Resources/English.lproj 40775 0/0
./System/Library/Filesystems/zfs.fs/Contents/Resources/English.lproj/InfoPlist.strings 100664 0/0 350 313940310
./System/Library/Filesystems/zfs.fs/Contents/Resources/VolumeIcon.icns 100664 0/0 196764 2464385493
./System/Library/Filesystems/zfs.fs/zfs.util 100775 0/0 25968 558532031
./usr 40755 0/0
./usr/bin 40755 0/0
./usr/bin/ztest 100775 0/0 158824 4205603153
./usr/lib 40755 0/0
./usr/lib/libzfs.dylib 100775 0/0 412936 1474474012
./usr/lib/libzpool.dylib 100775 0/0 1302312 871375979
./usr/local 40755 501/20
./usr/local/bin 40755 501/20
./usr/local/bin/zoink 100775 0/0 33840 3903998202
./usr/local/lib 40755 0/0
./usr/local/lib/liblibnsl.a 100664 0/0 41048 2742417936
./usr/local/lib/liblibnvpair.a 100664 0/0 144184 2928111968
./usr/sbin 40755 0/0
./usr/sbin/zdb 100755 0/0 119504 3881503442
./usr/sbin/zfs 100555 0/0 123624 590150479
./usr/sbin/zpool 100755 0/20 152744 3039814902
./usr/share 40755 0/0
./usr/share/man 40755 0/0
./usr/share/man/man8 40755 0/0
./usr/share/man/man8/zfs.8 100664 0/0 72888 494470227
./usr/share/man/man8/zfs.util.8 100664 0/0 2544 1734145497
./usr/share/man/man8/zpool.8 100664 0/0 41794 3146565922
What will actually get installed? Work backwards. See http://code.google.com/p/maczfs/wiki/Uninstalling.
ZFS is installed in the following files/locations:
/System/Library/Filesystems/zfs.fs
/System/Library/Extensions/zfs.kext
/System/Library/Extensions/zfs.readonly.kext (this is present on 10.5 systems only and is for read-only support)
/usr/sbin/zfs
/usr/sbin/zpool
/usr/sbin/zoink
/usr/sbin/zfs.util
/usr/lib/libzfs.dylib
/usr/share/man8/zfs.8
/usr/share/man8/zfs.util.8
/usr/share/man8/zpool.8
Do a TimeMachine backup prior to installing.
Go ahead and run the PKG installer. Will need admin/root/superuser privileges.
Reboot--just because you're old-skool. Then do another TimeMachine backup--just before you start mucking up your system any further.
Installed! MacZFS v74.3.0 provides zpool v8 and zfs v2.
[Next Step]
Not sure how to document from this point, because there's no GUI really, or anything Mac-like on the surface. Everything else is research and command-line-fu.
Here's how I made a 128mb file chunk to use as a play vdev.
reg$ dd if=/dev/zero bs=128k count=1024 of=~/Downloads/zfs_test_vdev_file2
1024+0 records in
1024+0 records out
134217728 bytes transferred in 1.082628 secs (123974003 bytes/sec)
[Next Step]
[document how] I went ahead and put a zpool onto an encrypted sparsebundle within an Amazon S3 bucket. Huh? Why? Not sure...still wrapping my head around foggy ideas and possible permutations regarding data integrity and availability robustness. Gotta find some way to use them obnoxious durability percentages.
Also, I'm exploring the concept of allowing the mirror construct (in my zpool) to provide a backup function out to a separate data store (no matter if local or how distantly remote). A backup process via the resilvering action.
In the past I've accessed remote filesystems over SSHFS, just to be able use them like regular directories. But currently I'm using a turnkey app (ExpanDrive) out to S3...verrrry slow because of my tiny AT&T pipe. Sure, be horrified if you want, that the remote store is a file...but the end result is still a valid, successfully-scrubbed, ZFS vdev.
[Next Step]
Years ago I was curious about ZFS stress-tested using USB flash drives. That would still be hilarious, and nowadays even economically possible! (Been meaning to try this) I could probably get a USB hub on clearance somewhere (but a self-powered one would be necessary). And the flash sticks could probably be picked-up in a dollar store.
Tested out by using simple zero'd file chunks or sparsebundle diskimages for the underlying vdev infrastructure of each zpool. Yeah I know...adding another abstraction layer...wacky, eh? But I don't have any unused drives available to experiment with. When Frankenstein'd together this way, the diskimage vdevs are not referenced by any kind of unique identifier--like, um, a UUID--but only by their lowest-level disk and slice info (e.g. disk3s2). Which can get get pretty confusing, pretty fast, when changing up mounted devices (real or otherwise). So when creating a zpool with vdevs like this, remember the recipe of the build by keeping track of what's currently loaded, and in what order!
disk image vdevs not using unique identifiers, just "disk & slice" info
disk image vdevs: don't leave trailing slashes in the paths in the command-line arguments because they'll get "doubled" in the final path reference for the vdev
can't interrupt the automatic resilver that happens when you attach to a mirror
zpool create:
zpool features: can't set delegation [as of v74.3.0]
zfs features: can't set filesystem features [as of v74.3.0]
zpool import: can't set pool or filesystem features [as of v74.3.0]
This is pretty cool!
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[temp Store screencaps here, then Move into the text as necessary]
cap1
cap2