Documentation
¶
Overview ¶
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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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 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 (*Dataset) Clone ¶
Clone clones a snapshot. An error will be returned if a non-snapshot is used
func (*Dataset) GetProperty ¶
GetProperty Gets a property
func (*Dataset) SetProperty ¶
SetProperty sets a property
Click to show internal directories.
Click to hide internal directories.