Documentation ¶
Index ¶
Constants ¶
const ( DatasetFilesystem = "filesystem" DatasetSnapshot = "snapshot" DatasetVolume = "volume" )
ZFS dataset types, which can indicate if a dataset is a filesystem, snapshot, or volume.
const ( ZpoolOnline = "ONLINE" ZpoolDegraded = "DEGRADED" ZpoolFaulted = "FAULTED" ZpoolOffline = "OFFLINE" ZpoolRemoved = "REMOVED" )
ZFS zpool states, which can indicate if a pool is online, offline, degraded, etc
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dataset ¶
type Dataset struct { Name string Available string Clones string Compressratio string Creation string DeferDestroy string Logicalreferenced string Logicalused string Mounted string Origin string Refcompressratio string Referenced string Type string Used string Usedbychildren string Usedbydataset string Usedbyrefreservation string Usedbysnapshots string Userrefs string Written string Aclinherit string Acltype string Atime string Canmount string Casesensitivity string Checksum string Compression string Context string Copies string Dedup string Defcontext string Devices string Exec string FilesystemCount string FilesystemLimit string Fscontext string Logbias string Mlslabel string Mountpoint string Nbmand string Normalization string Overlay string Primarycache string Quota string Readonly string Recordsize string RedundantMetadata string Refquota string Refreservation string Relatime string Reservation string Rootcontext string Secondarycache string Setuid string Snapdev string Snapdir string SnapshotCount string SnapshotLimit string Sync string Utf8only string Version string Volblocksize string Volsize string Vscan string Xattr string Zoned string }
Dataset is a ZFS dataset. A dataset could be a clone, filesystem, snapshot, or volume. The Type struct member can be used to determine a dataset's type.
The field definitions can be found in the ZFS manual: http://www.freebsd.org/cgi/man.cgi?zfs(8).
func Datasets ¶
Datasets returns a slice of ZFS datasets, regardless of type. A filter argument may be passed to select a dataset with the matching name, or empty string ("") may be used to select all datasets.
func Filesystems ¶
Filesystems returns a slice of ZFS filesystems. A filter argument may be passed to select a filesystem with the matching name, or empty string ("") may be used to select all filesystems.
func GetDataset ¶
GetDataset retrieves a single ZFS dataset by name. This dataset could be any valid ZFS dataset type, such as a clone, filesystem, snapshot, or volume.
func Snapshots ¶
Snapshots returns a slice of ZFS snapshots. A filter argument may be passed to select a snapshot with the matching name, or empty string ("") may be used to select all snapshots.
type Error ¶
Error is an error which is returned when the `zfs` or `zpool` shell commands return with a non-zero exit code.
type Zfsbeat ¶
type Zfsbeat struct {
// contains filtered or unexported fields
}
Zfsbeat configuration.
type Zpool ¶
type Zpool struct { Name string Size uint64 Capacity uint64 Altroot string Health string GUID string Version string Bootfs string Delegation string Autoreplace string Cachefile string Failmode string Listsnapshots string Autoexpand string Dedupditto string Dedupratio float64 Free uint64 Allocated uint64 Readonly string Ashift uint64 Comment string Expandsize uint64 Freeing uint64 Fragmentation uint64 Leaked uint64 FeatureAsyncDestroy string FeatureEmptyBpobj string FeatureLz4Compress string FeatureSpacemapHistogram string FeatureEnabledTxg string FeatureHoleBirth string FeatureExtensibleDataset string FeatureEmbeddedData string FeatureBookmarks string FeatureFilesystemLimits string FeatureLargeBlocks string }
Zpool is a ZFS zpool. A pool is a top-level structure in ZFS, and can contain many descendent datasets.
func ListZpools ¶
ListZpools list all ZFS zpools accessible on the current system.