go-zfs

Go wrappers for ZFS commands

  • Owner: mistifyio/go-zfs
  • Platform:
  • License:: Apache License 2.0
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

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

Main metrics

Overview
Name With Ownermistifyio/go-zfs
Primary LanguageGo
Program languageGo (Language Count: 4)
Platform
License:Apache License 2.0
所有者活动
Created At2014-08-15 17:58:54
Pushed At2024-07-29 22:54:23
Last Commit At2023-05-22 22:19:15
Release Count7
Last Release Namev3.0.1 (Posted on 2023-05-22 22:04:53)
First Release Namev1.0.0 (Posted on )
用户参与
Stargazers Count131
Watchers Count17
Fork Count66
Commits Count165
Has Issues Enabled
Issues Count27
Issue Open Count13
Pull Requests Count46
Pull Requests Open Count8
Pull Requests Close Count12
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private