package zfs
import "github.com/mistifyio/go-zfs"
Package zfs provides wrappers around the ZFS command line tools
Index ¶
- type Dataset
- func CreateFilesystem(name string, properties map[string]string) (*Dataset, error)
- func CreateVolume(name string, size uint64, properties map[string]string) (*Dataset, error)
- func Datasets(filter string) ([]*Dataset, error)
- func Filesystems(filter string) ([]*Dataset, error)
- func GetDataset(name string) (*Dataset, error)
- func ReceiveSnapshot(input io.Reader, name string) (*Dataset, error)
- func Snapshots(filter string) ([]*Dataset, error)
- func Volumes(filter string) ([]*Dataset, error)
- func (d *Dataset) Clone(dest string, properties map[string]string) (*Dataset, error)
- func (d *Dataset) Destroy(recursive bool) error
- func (d *Dataset) GetProperty(key string) (string, error)
- func (d *Dataset) SetProperty(key, val string) error
- func (d *Dataset) Snapshot(name string, properties map[string]string) (*Dataset, error)
- func (d *Dataset) Snapshots() ([]*Dataset, error)
- type Zpool
Types ¶
type Dataset ¶
type Dataset struct { Name string Used uint64 Avail uint64 Mountpoint string Compression string Type string Written uint64 Volsize uint64 Usedbydataset uint64 }
Dataset is a zfs dataset. This could be a volume, filesystem, snapshot. Check the type field The field definitions can be found in the zfs manual: http://www.freebsd.org/cgi/man.cgi?zfs(8)
func CreateFilesystem ¶
CreateFilesystem creates a new filesystem
func CreateVolume ¶
CreateVolume creates a new volume
func Datasets ¶
Datasets returns a slice of all datasets
func Filesystems ¶
Filesystems returns a slice of all filesystems
func GetDataset ¶
GetDataset retrieves a single dataset
func ReceiveSnapshot ¶
ReceiveSnapshot receives a zfs stream into a new snapshot
func Snapshots ¶
Snapshots returns a slice of all snapshots
func Volumes ¶
Volumes returns a slice of all volumes
func (*Dataset) Clone ¶
Clone clones a snapshot. An error will be returned if a non-snapshot is used
func (*Dataset) Destroy ¶
Destroy destroys a dataset
func (*Dataset) GetProperty ¶
GetProperty Gets a property
func (*Dataset) SetProperty ¶
SetProperty sets a property
func (*Dataset) Snapshot ¶
Snapshot creates a snapshot
func (*Dataset) Snapshots ¶
Snapshots returns a slice of all snapshots of a given dataset
type Zpool ¶
type Zpool struct { Name string }
Zpool represents a ZFS Pool
func CreateZpool ¶
CreateZpool creates a new zpool
func GetZpool ¶
GetZpool retrieves a Zpool
func (*Zpool) Datasets ¶
Datasets returns a slice of all datasets in a zpool
func (*Zpool) Destroy ¶
Destroy destroys a zpool
func (*Zpool) Snapshots ¶
Snapshots returns a slice of all snapshots in a zpool
Source Files ¶
- Version
- v0.0.0
- Published
- Aug 15, 2014
- Platform
- js/wasm
- Imports
- 8 packages
- Last checked
- 2 days ago –
Tools for package owners.