docker/docker — pull request #8400 by burke (2014-10-05 18:14:57+00:00)
Title: [WIP] Add ZFS graphdriver

I haven't even tried this code yet, but I want to solicit comments. It occurred to me yesterday that ZFS support would actually be *really* easy to implement. Is this a path you want to go down? At Shopify, most of us have more trust in ZFS than in BTRFS, and I get the sense that's a pretty common sentiment.

Any pitfalls, concerns, etc.? Should I polish this up and test it, or will it be rejected? If so, why?

Thanks!

---

This work is largely based on a the BTRFS graphdriver, and I used @gurjeet's earlier work at https://github.com/gurjeet/docker/tree/00cb6818/graphdriver/zfs for reference.

The current implementation shells out to the `zfs` tool. I debated implementing this with the semi-private `libzfs` and `cgo`, but decided that:

1) The API of the command-line tool will be more stable; and
2) This was a simpler first step.

If it is desired to implement on `libzfs` directly, all the actual integration is squared away in `fs.go`, which should make for a very easy refactor.

Note that this does add a pretty hairy dependency to the dev Dockerfile. `ubuntu-zfs` takes a while to install, and makes some implicit assertions about the host kernel, which is fairly unique within the context of what's there presently. I'm not totally sure how/whether to work around this.

/cc FYI @graemej @Sirupsen @marc-barry @n1koo @dalehamel