Documentation ¶
Index ¶
- Constants
- func Exists(name string) (bool, error)
- func Receive(stream io.Reader, name string) error
- type By
- type DMUObjsetStats
- type Dataset
- func (d *Dataset) Children(depth uint64) ([]*Dataset, error)
- func (d *Dataset) Clone(name string, properties map[string]interface{}) (*Dataset, error)
- func (d *Dataset) Destroy(opts *DestroyOptions) error
- func (d *Dataset) Diff(name string)
- func (d *Dataset) Holds() ([]string, error)
- func (d *Dataset) Mount(overlay bool, options []string) error
- func (d *Dataset) Mountpoint() string
- func (d *Dataset) Pool() string
- func (d *Dataset) Rename(newName string, recursive bool) (string, error)
- func (d *Dataset) Rollback(destroyMoreRecent bool) error
- func (d *Dataset) Send(output io.Writer) error
- func (d *Dataset) SetProperty(name string, value interface{}) error
- func (d *Dataset) Snapshot(name string, recursive bool) error
- func (d *Dataset) Snapshots() ([]*Dataset, error)
- func (d *Dataset) Unmount(force bool) error
- type DatasetProperties
- type DestroyOptions
Constants ¶
const ( DatasetFilesystem = "filesystem" DatasetSnapshot = "snapshot" DatasetVolume = "volume" )
ZFS Dataset Types
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DMUObjsetStats ¶
type DMUObjsetStats struct { CreationTxg uint64 `nv:"dds_creation_txg"` GUID uint64 `nv:"dds_guid"` Inconsistent bool `nv:"dds_inconsistent"` IsSnapshot bool `nv:"dds_is_snapshot"` NumClones uint64 `nv:"dds_num_clones"` Origin string `nv:"dds_origin"` Type string `nv:"dds_type"` }
DMUObjsetStats represents zfs dataset information.
type Dataset ¶
type Dataset struct { Name string Properties *DatasetProperties DMUObjsetStats *DMUObjsetStats }
Dataset contains information and properties for a ZFS dataset.
func CreateFilesystem ¶
CreateFilesystem creates a new filesystem.
func CreateVolume ¶
CreateVolume creates a new volume.
func Datasets ¶
Datasets retrieves a list of datasets of specified types. If types are not specified, all types will be returned.
func GetDataset ¶
GetDataset retrieves a single dataset.
func (*Dataset) Destroy ¶
func (d *Dataset) Destroy(opts *DestroyOptions) error
Destroy destroys a zfs dataset, optionally recursive for descendants and clones. Note that recursive destroys are not an atomic operation.
func (*Dataset) Diff ¶
Diff returns changes between a snapshot and the given dataset. Currently a stub.
func (*Dataset) Mountpoint ¶
Mountpoint returns the mountpoint of the dataset. It is based off of the dataset mountpoint property joined to the dataset name with the mountpointsource property trimmed from the name.
func (*Dataset) SetProperty ¶
SetProperty sets the value of a property of the dataset. Currently a stub.
type DatasetProperties ¶
type DatasetProperties struct { Available uint64 CaseSensitivity uint64 CaseSensitivitySource string Clones []string CompressRatio uint64 Compression string // Empty value is replaced with "off" CompressionSource string CreateTxg uint64 Creation uint64 DeferDestroy uint64 GUID uint64 LogicalReferenced uint64 LogicalUsed uint64 Mountpoint string MountpointSource string Normalization uint64 NormalizationSource string ObjsetID uint64 Origin string PrevSnap string PrevSnapSource string Quota uint64 QuotaSource string RefCompressRatio uint64 RefQuota uint64 RefQuotaSource string RefReservation uint64 RefReservationSource string Referenced uint64 Reservation uint64 ReservationSource string Type string // Int type mapped to string type UTF8Only bool UTF8OnlySource string Unique uint64 Used uint64 UsedByChildren uint64 UsedByDataset uint64 UsedByRefReservation uint64 UsedBySnapshots uint64 UserAccounting uint64 UserDefined map[string]string UserRefs uint64 Version uint64 VolBlockSize uint64 VolBlockSizeSource string Volsize uint64 Written uint64 }
DatasetProperties are properties of a ZFS dataset. Some properties may be modified from the values returned by zfs.