Documentation ¶
Index ¶
Constants ¶
View Source
const SysfsPCIDriversPath = "/sys/bus/pci/drivers/smartpqi"
Variables ¶
View Source
var ErrNoArcconf = errors.New("no 'arcconf' command in PATH")
ErrNoArcconf - Error reported by Query if no arcconf binary in PATH
View Source
var ErrNoController = errors.New("smartpqi Controller not found")
ErrNoController - Error reported by Query if no controller is found.
View Source
var ErrUnsupported = errors.New("smartpqi Controller unsupported")
ErrUnsupported - Error reported by Query if controller is not supported.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct { ID int PhysicalDrives DriveSet LogicalDrives LogicalDriveSet }
type DriveSet ¶
type DriveSet map[int]*PhysicalDevice
type LogicalDevice ¶
type LogicalDevice struct { ArrayID int `json:"ArrayID"` BlockSize int `json:"BlockSize"` Caching string `json:"Caching"` Devices []*PhysicalDevice DiskName string `json:"DiskName"` ID int `json:"ID"` InterfaceType string `json:"InterfaceType"` Name string `json:"Name"` RAIDLevel string `json:"RAIDLevel"` SizeMB int `json:"SizeMB"` }
func (*LogicalDevice) IsSSD ¶
func (ld *LogicalDevice) IsSSD() bool
IsSSD - is this logical device composed of all SSD
type LogicalDriveSet ¶
type LogicalDriveSet map[int]*LogicalDevice
type MediaType ¶
type MediaType int
MediaType
func GetMediaType ¶
func (MediaType) MarshalJSON ¶
MarshalJSON for string output rather than int
func (*MediaType) UnmarshalJSON ¶
type PhysicalDevice ¶
type PhysicalDevice struct { ArrayID int `json:"ArrayID"` Availability string `json:"Availability"` BlockSize int `json:"BlockSize"` Channel int `json:"Channel"` ID int `json:"ID"` Firmware string `json:"Firmware"` Model string `json:"Model"` PhysicalBlockSize int `json:"PhysicalBlockSize"` Protocol string `json:"Protocol"` SerialNumber string `json:"SerialNumber"` SizeMB int `json:"SizeMB"` Type MediaType `json:"Type"` Vendor string `json:"Vendor"` WriteCache string `json:"WriteCache"` }
type SmartPqi ¶
type SmartPqi interface { // List - Return list of Controller IDs List() ([]int, error) // Query - Query the controller provided Query(int) (Controller, error) // GetDiskType - Determine the disk type if controller owns disk GetDiskType(string) (disko.DiskType, error) // DriverSysfsPath - Return the sysfs path to the linux driver for this controller DriverSysfsPath() string // IsSysPathRAID - Check if sysfs path is a device on the controller IsSysPathRAID(string) bool }
SmartPqi - basic interface
Click to show internal directories.
Click to hide internal directories.