Documentation
¶
Index ¶
- Constants
- func FilesystemCreateWithArgs(l []string) funcopt.O
- func FilesystemCreateWithQuota(size *int64) funcopt.O
- func FilesystemCreateWithRefQuota(size *int64) funcopt.O
- func FilesystemCreateWithRefReservation(size *int64) funcopt.O
- func FilesystemCreateWithReservation(size *int64) funcopt.O
- func FilesystemDestroyWithNode(s string) funcopt.O
- func FilesystemDestroyWithRecurse(v bool) funcopt.O
- func FilesystemDestroyWithRemoveSnapshots(v bool) funcopt.O
- func FilesystemDestroyWithTryImmediate(v bool) funcopt.O
- func FilesystemMountWithOverlay(v bool) funcopt.O
- func FilesystemRenameWithNode(s string) funcopt.O
- func FilesystemRenameWithRecurse(v bool) funcopt.O
- func FilesystemSnapshotWithArgs(l []string) funcopt.O
- func FilesystemSnapshotWithRecursive(v bool) funcopt.O
- func FilesystemUmountWithForce(v bool) funcopt.O
- func IsCapable() bool
- func ListWithLogger(l *plog.Logger) funcopt.O
- func ListWithNames(l ...string) funcopt.O
- func ListWithOrderBy(l ...string) funcopt.O
- func ListWithOrderReverse() funcopt.O
- func ListWithTypes(l ...DatasetType) funcopt.O
- func PoolCreateWithArgs(l []string) funcopt.O
- func PoolCreateWithVDevs(l []string) funcopt.O
- func PoolDestroyWithForce() funcopt.O
- func PoolExportWithForce() funcopt.O
- func PoolImportWithCacheFile(s string) funcopt.O
- func PoolImportWithDevice(s string) funcopt.O
- func PoolImportWithForce() funcopt.O
- func PoolImportWithOption(option, value string) funcopt.O
- func PoolImportWithQuiet() funcopt.O
- func PoolStatusWithVerbose() funcopt.O
- func VolCreateWithArgs(l []string) funcopt.O
- func VolCreateWithBlockSize(size uint64) funcopt.O
- func VolCreateWithSize(size uint64) funcopt.O
- func VolDestroyWithBusyRetries(count int) funcopt.O
- func VolDestroyWithForce() funcopt.O
- type Dataset
- type DatasetName
- type DatasetType
- type DatasetTypes
- type Filesystem
- func (t Filesystem) BaseName() string
- func (t *Filesystem) Create(fopts ...funcopt.O) error
- func (t *Filesystem) Destroy(fopts ...funcopt.O) error
- func (t *Filesystem) Exists() (bool, error)
- func (t Filesystem) GetLog() *plog.Logger
- func (t Filesystem) GetName() string
- func (t *Filesystem) GetProperty(prop string) (string, error)
- func (t *Filesystem) Mount(fopts ...funcopt.O) error
- func (t Filesystem) PoolName() string
- func (t *Filesystem) Rename(dst string, fopts ...funcopt.O) error
- func (t *Filesystem) SetProperty(prop, value string) error
- func (t *Filesystem) Snapshot(fopts ...funcopt.O) error
- func (t *Filesystem) SnapshotExists() (bool, error)
- func (t *Filesystem) Umount(fopts ...funcopt.O) error
- type Filesystems
- type ListDatasetsOpts
- type Pool
- func (t *Pool) Create(fopts ...funcopt.O) error
- func (t *Pool) Destroy(fopts ...funcopt.O) error
- func (t *Pool) Exists() (bool, error)
- func (t *Pool) Export(fopts ...funcopt.O) error
- func (t *Pool) GetProperty(prop string) (string, error)
- func (t *Pool) Import(fopts ...funcopt.O) error
- func (t *Pool) ListVolumes(fopts ...funcopt.O) (Vols, error)
- func (t *Pool) SetProperty(prop, value string) error
- func (t *Pool) Status(fopts ...funcopt.O) (PoolStatusData, error)
- func (t *Pool) Usage(fopts ...funcopt.O) (PoolUsage, error)
- func (t *Pool) VDevDevices() (device.L, error)
- func (t *Pool) VDevPaths() ([]string, error)
- type PoolStatusData
- type PoolUsage
- type Vol
- func (t Vol) BaseName() string
- func (t *Vol) Create(fopts ...funcopt.O) error
- func (t *Vol) Destroy(fopts ...funcopt.O) error
- func (t *Vol) Exists() (bool, error)
- func (t Vol) GetLog() *plog.Logger
- func (t Vol) GetName() string
- func (t *Vol) GetProperty(prop string) (string, error)
- func (t Vol) PoolName() string
- func (t *Vol) SetProperty(prop, value string) error
- type Vols
Constants ¶
const ( // DatasetTypeFilesystem - file system dataset DatasetTypeFilesystem DatasetType = (1 << 0) // DatasetTypeSnapshot - snapshot of dataset DatasetTypeSnapshot = (1 << 1) // DatasetTypeVolume - volume (virtual block device) dataset DatasetTypeVolume = (1 << 2) // DatasetTypePool - pool dataset DatasetTypePool = (1 << 3) // DatasetTypeBookmark - bookmark dataset DatasetTypeBookmark = (1 << 4) )
Variables ¶
This section is empty.
Functions ¶
func FilesystemCreateWithArgs ¶
FilesystemCreateWithArgs defines the shlex splitted list of arguments to prepend to the command.
func FilesystemCreateWithQuota ¶
FilesystemCreateWithQuota Limits the amount of space a dataset and its descendents can consume. This property enforces a hard limit on the amount of space used. This includes all space consumed by descendents, including file systems and snapshots. Setting a quota on a descendent of a dataset that already has a quota does not override the ancestor's quota, but rather imposes an additional limit.
func FilesystemCreateWithRefQuota ¶
FilesystemCreateWithRefQuota Limits the amount of space a dataset can consume. This property enforces a hard limit on the amount of space used. This hard limit does not include space used by descendents, including file systems and snapshots.
func FilesystemCreateWithRefReservation ¶
FilesystemCreateWithRefReservation is the minimum amount of space guaranteed to a dataset, not including its descendents. When the amount of space used is below this value, the dataset is treated as if it were taking up the amount of space specified by refreservation. The refreservation reservation is accounted for in the parent datasets' space used, and counts against the parent datasets' quotas and reservations.
If refreservation is set, a snapshot is only allowed if there is enough free pool space outside of this reservation to accommodate the current number of "referenced" bytes in the dataset.
func FilesystemCreateWithReservation ¶
FilesystemCreateWithReservation is the minimum amount of space guaranteed to a dataset and its descendents. When the amount of space used is below this value, the dataset is treated as if it were taking up the amount of space specified by its reservation. Reservations are accounted for in the parent datasets' space used, and count against the parent datasets' quotas and reservations.
func FilesystemDestroyWithRecurse ¶
FilesystemDestroyWithRecurse recursively destroys all clones of these snapshots, including the clones, snapshots, and children. If this flag is specified, the FilesystemDestroyWithTryImmediate flag will have no effect.
func FilesystemDestroyWithRemoveSnapshots ¶
FilesystemDestroyWithRemoveSnapshots forces an unmount of any file systems using the unmount -f command. This option has no effect on non-file systems or unmounted file systems. TODO: fix above doc ?
func FilesystemDestroyWithTryImmediate ¶
FilesystemDestroyWithTryImmediate destroys immediately. If a snapshot cannot be destroyed now, mark it for deferred destruction.
func FilesystemMountWithOverlay ¶
FilesystemMountWithOverlay performs an overlay mount. Allows mounting in non-empty mountpoint.
func FilesystemRenameWithRecurse ¶
FilesystemRenameWithRecurse recursively renames all datasets
func FilesystemSnapshotWithArgs ¶
FilesystemSnapshotWithArgs defines the shlex splitted list of arguments to prepend to the command.
func FilesystemUmountWithForce ¶
FilesystemUmountWithForce forcefully unmounts the file system, even if it is currently in use. This option is not supported on Linux.
func ListWithNames ¶
func ListWithOrderBy ¶
func ListWithOrderReverse ¶
func ListWithTypes ¶
func ListWithTypes(l ...DatasetType) funcopt.O
func PoolCreateWithArgs ¶
PoolCreateWithArgs defines the shlex splitted list of arguments to prepend to the command.
func PoolCreateWithVDevs ¶
PoolCreateWithVDevs defines the list of block devices paths to add to the pool.
func PoolDestroyWithForce ¶
PoolDestroyWithForce forces any active datasets contained within the pool to be unmounted.
func PoolExportWithForce ¶
PoolExportWithForce forcefully unmounts all datasets, using the unmount -f command. This option is not supported on Linux.
func PoolImportWithCacheFile ¶
PoolImportWithCacheFile reads configuration from the given cachefile that was created with the cachefile pool property. This cachefile is used instead of searching for devices.
func PoolImportWithDevice ¶
PoolImportWithDevice uses device or searches for devices or files in dir. PoolImportWithDevice can be specified multiple times. PoolImportWithDevice incompatible with PoolImportWithCacheFile.
func PoolImportWithForce ¶
PoolImportWithForce forcefully unmounts all datasets, using the unmount -f command. This option is not supported on Linux.
func PoolImportWithOption ¶
PoolImportWithOption is a mount option to use when mounting datasets within the pool.
func PoolImportWithQuiet ¶
PoolImportWithQuiet sets debug level for error and output logging
func PoolStatusWithVerbose ¶
PoolStatusWithVerbose displays verbose data error information, printing out a complete list of all data errors since the last complete pool scrub.
func VolCreateWithArgs ¶
VolCreateWithArgs defines the shlex splitted list of arguments to prepend to the command.
func VolCreateWithBlockSize ¶
VolCreateWithBlockSize defines the block size of the volume in bytes
func VolCreateWithSize ¶
VolCreateWithSize defines the size of the volume in bytes
func VolDestroyWithBusyRetries ¶
VolDestroyWithBusyRetries is the number of retries when the destroy command reports "busy".
func VolDestroyWithForce ¶
VolDestroyWithForce forces an unmount of any file systems using the unmount -f command. This option has no effect on non-file systems or unmounted file systems.
Types ¶
type DatasetName ¶
type DatasetName string
func (DatasetName) BaseName ¶
func (t DatasetName) BaseName() string
BaseName returns the basename extracted from a <pool>/<basename> string.
func (DatasetName) PoolName ¶
func (t DatasetName) PoolName() string
PoolName returns the pool name extracted from a <pool>/<basename> string.
func (DatasetName) String ¶
func (t DatasetName) String() string
String implements the stringer interface.
type DatasetType ¶
type DatasetType int32
func (DatasetType) String ¶
func (t DatasetType) String() string
type DatasetTypes ¶
type DatasetTypes []DatasetType
func (DatasetTypes) String ¶
func (t DatasetTypes) String() string
type Filesystem ¶
func (Filesystem) BaseName ¶
func (t Filesystem) BaseName() string
func (*Filesystem) Exists ¶
func (t *Filesystem) Exists() (bool, error)
func (Filesystem) GetLog ¶
func (t Filesystem) GetLog() *plog.Logger
func (Filesystem) GetName ¶
func (t Filesystem) GetName() string
func (*Filesystem) GetProperty ¶
func (t *Filesystem) GetProperty(prop string) (string, error)
GetProperty returns a dataset property value
func (Filesystem) PoolName ¶
func (t Filesystem) PoolName() string
func (*Filesystem) SetProperty ¶
func (t *Filesystem) SetProperty(prop, value string) error
SetProperty sets a dataset property value
func (*Filesystem) SnapshotExists ¶
func (t *Filesystem) SnapshotExists() (bool, error)
type Filesystems ¶
type Filesystems []Filesystem
func ListFilesystems ¶
func ListFilesystems(fopts ...funcopt.O) (Filesystems, error)
type ListDatasetsOpts ¶
type Pool ¶
func (*Pool) GetProperty ¶
GetProperty returns a dataset property value
func (*Pool) SetProperty ¶
type PoolStatusData ¶
type Vol ¶
func (*Vol) GetProperty ¶
GetProperty returns a dataset property value
func (*Vol) SetProperty ¶
SetProperty sets a dataset property value
Source Files
¶
- ds.go
- ds_property.go
- fs.go
- fs_create.go
- fs_destroy.go
- fs_exists.go
- fs_mount.go
- fs_property.go
- fs_rename.go
- fs_snapshot.go
- fs_umount.go
- main.go
- name.go
- pool.go
- pool_create.go
- pool_destroy.go
- pool_export.go
- pool_import.go
- pool_list.go
- pool_property.go
- pool_status.go
- pool_usage.go
- vol.go
- vol_create.go
- vol_destroy.go
- vol_exists.go
- vol_list.go
- vol_property.go