1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/vendor/src/github.com/mistifyio/go-zfs
Amit Krishnan efb3946171 update go-zfs to include Solaris support
Signed-off-by: Amit Krishnan <krish.amit@gmail.com>
2016-05-10 13:51:03 -07:00
..
.gitignore Implement Docker on ZFS 2015-05-08 17:48:20 +02:00
.travis.yml update go-zfs to include Solaris support 2016-05-10 13:51:03 -07:00
CONTRIBUTING.md Picking up missed out vendor files via hack/vendor.sh 2015-06-15 11:38:06 -07:00
error.go Implement Docker on ZFS 2015-05-08 17:48:20 +02:00
LICENSE Implement Docker on ZFS 2015-05-08 17:48:20 +02:00
README.md Picking up missed out vendor files via hack/vendor.sh 2015-06-15 11:38:06 -07:00
utils.go update go-zfs to include Solaris support 2016-05-10 13:51:03 -07:00
utils_notsolaris.go update go-zfs to include Solaris support 2016-05-10 13:51:03 -07:00
utils_solaris.go update go-zfs to include Solaris support 2016-05-10 13:51:03 -07:00
zfs.go update go-zfs to include Solaris support 2016-05-10 13:51:03 -07:00
zpool.go update go-zfs to include Solaris support 2016-05-10 13:51:03 -07:00

Go Wrapper for ZFS

Simple wrappers for ZFS command line tools.

GoDoc

Requirements

You need a working ZFS setup. To use on Ubuntu 14.04, setup ZFS:

sudo apt-get install python-software-properties
sudo apt-add-repository ppa:zfs-native/stable
sudo apt-get update
sudo apt-get install ubuntu-zfs libzfs-dev

Developed using Go 1.3, but currently there isn't anything 1.3 specific. Don't use Ubuntu packages for Go, use http://golang.org/doc/install

Generally you need root privileges to use anything zfs related.

Status

This has been only been tested on Ubuntu 14.04

In the future, we hope to work directly with libzfs.

Hacking

The tests have decent examples for most functions.

//assuming a zpool named test
//error handling ommitted


f, err := zfs.CreateFilesystem("test/snapshot-test", nil)
ok(t, err)

s, err := f.Snapshot("test", nil)
ok(t, err)

// snapshot is named "test/snapshot-test@test"

c, err := s.Clone("test/clone-test", nil)

err := c.Destroy()
err := s.Destroy()
err := f.Destroy()

Contributing

See the contributing guidelines