Documentation
¶
Index ¶
Constants ¶
View Source
const (
PoolOperator = "zpool"
)
PoolOperator is the name of the tool that makes pool-related operations.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Topology ¶
type Topology struct { // Number of top-level children in topology (doesnt include spare/l2cache) ChildrenCount int `json:"vdev_children,omitempty"` // Root of vdev topology VdevTree VdevTree `json:"vdev_tree,omitempty"` }
Topology contains the topology strucure of disks used in backend
type Vdev ¶
type Vdev struct { // root for Root vdev, Raid type in case of non-level 0 vdev, // and file/disk in case of level-0 vdev VdevType string `json:"type,omitempty"` // Path of the disk or sparse file Path string `json:"path,omitempty"` // 0 means not write-cache device, 1 means write-cache device IsLog int `json:"is_log,omitempty"` // 0 means not spare device, 1 means spare device IsSpare int `json:"is_spare,omitempty"` // 0 means partitioned disk, 1 means whole disk IsWholeDisk int `json:"whole_disk,omitempty"` // child vdevs of the logical disk or null for physical disk/sparse Children []Vdev `json:"children,omitempty"` }
Vdev relates to a logical or physical disk in backend
type VdevTree ¶
type VdevTree struct { // root for Root vdev, Raid type in case of non-level 0 vdev, // and file/disk in case of level-0 vdev VdevType string `json:"type,omitempty"` // top-level vdev topology Topvdev []Vdev `json:"children,omitempty"` // list of read-cache devices Readcache []Vdev `json:"l2cache,omitempty"` // list of spare devices Spares []Vdev `json:"spares,omitempty"` }
VdevTree contains the tree strucure of disks used in backend
Click to show internal directories.
Click to hide internal directories.