This commit is contained in:
@@ -13,6 +13,37 @@ type Pool struct {
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
|
||||
// PoolDetail represents detailed pool information from zpool status
|
||||
type PoolDetail struct {
|
||||
Name string `json:"name"`
|
||||
State string `json:"state"` // ONLINE, DEGRADED, FAULTED
|
||||
Status string `json:"status"` // Full status message
|
||||
VDEVs []VDEV `json:"vdevs"` // Virtual devices
|
||||
Spares []string `json:"spares"` // Spare disks
|
||||
Errors string `json:"errors"` // Error summary
|
||||
ScrubInfo string `json:"scrub_info"` // Scrub information
|
||||
}
|
||||
|
||||
// VDEV represents a virtual device in a pool
|
||||
type VDEV struct {
|
||||
Name string `json:"name"` // VDEV name or type
|
||||
Type string `json:"type"` // mirror, raidz, raidz2, etc.
|
||||
State string `json:"state"` // ONLINE, DEGRADED, etc.
|
||||
Disks []Disk `json:"disks"` // Disks in this VDEV
|
||||
Read int `json:"read"` // Read errors
|
||||
Write int `json:"write"` // Write errors
|
||||
Checksum int `json:"checksum"` // Checksum errors
|
||||
}
|
||||
|
||||
// Disk represents a disk in a VDEV
|
||||
type Disk struct {
|
||||
Name string `json:"name"` // Disk name (e.g., sdb)
|
||||
State string `json:"state"` // ONLINE, DEGRADED, FAULTED, etc.
|
||||
Read int `json:"read"` // Read errors
|
||||
Write int `json:"write"` // Write errors
|
||||
Checksum int `json:"checksum"` // Checksum errors
|
||||
}
|
||||
|
||||
// Dataset represents a ZFS filesystem
|
||||
type Dataset struct {
|
||||
Name string `json:"name"`
|
||||
|
||||
Reference in New Issue
Block a user