go-zfs

Go wrappers for ZFS commands

  • 所有者: mistifyio/go-zfs
  • 平台:
  • 许可证: Apache License 2.0
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

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

主要指标

概览
名称与所有者mistifyio/go-zfs
主编程语言Go
编程语言Go (语言数: 4)
平台
许可证Apache License 2.0
所有者活动
创建于2014-08-15 17:58:54
推送于2024-07-29 22:54:23
最后一次提交2023-05-22 22:19:15
发布数7
最新版本名称v3.0.1 (发布于 2023-05-22 22:04:53)
第一版名称v1.0.0 (发布于 )
用户参与
星数131
关注者数17
派生数66
提交数165
已启用问题?
问题数27
打开的问题数13
拉请求数46
打开的拉请求数8
关闭的拉请求数12
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?