automation-tests/common/vendor/github.com/mistifyio/go-zfs/v3
renovate[bot] 3776fc8358 fix(deps): update github.com/containers/storage digest to 1dc289a
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-05 18:41:11 +00:00
..
.envrc Vendor in latest containers/storage 2022-09-29 06:02:01 -04:00
.gitignore Vendor in latest containers/storage 2022-09-29 06:02:01 -04:00
.golangci.yml Vendor in latest containers/storage 2022-09-29 06:02:01 -04:00
.yamllint Vendor in latest containers/storage 2022-09-29 06:02:01 -04:00
CHANGELOG.md Vendor in latest containers/storage 2022-09-29 06:02:01 -04:00
CONTRIBUTING.md Vendor in latest containers/storage 2022-09-29 06:02:01 -04:00
LICENSE Vendor in latest containers/storage 2022-09-29 06:02:01 -04:00
Makefile Vendor in latest containers/storage 2022-09-29 06:02:01 -04:00
README.md Vendor in latest containers/storage 2022-09-29 06:02:01 -04:00
Vagrantfile Vendor in latest containers/storage 2022-09-29 06:02:01 -04:00
error.go Vendor in latest containers/storage 2022-09-29 06:02:01 -04:00
lint.mk Vendor in latest containers/storage 2022-09-29 06:02:01 -04:00
rules.mk Vendor in latest containers/storage 2022-09-29 06:02:01 -04:00
shell.nix Vendor in latest containers/storage 2022-09-29 06:02:01 -04:00
utils.go fix(deps): update github.com/containers/storage digest to 1dc289a 2023-06-05 18:41:11 +00:00
utils_notsolaris.go fix(deps): update github.com/containers/storage digest to 1dc289a 2023-06-05 18:41:11 +00:00
utils_solaris.go fix(deps): update github.com/containers/storage digest to 1dc289a 2023-06-05 18:41:11 +00:00
zfs.go Vendor in latest containers/storage 2022-09-29 06:02:01 -04:00
zpool.go fix(deps): update github.com/containers/storage digest to 1dc289a 2023-06-05 18:41:11 +00:00

README.md

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 omitted


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