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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?