megactl

package
v0.0.0-...-2b29b9b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 25, 2024 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCommand

func GetCommand(args ...string) string

func GetCommand2

func GetCommand2(args ...string) string

func GetSpecString

func GetSpecString(dev *baremetal.BaremetalStorage) string

func NewMegaRaid

func NewMegaRaid(term raid.IExecTerm) raiddrivers.IRaidDriver

Types

type MegaRaid

type MegaRaid struct {
	PhyDevsCnt int
	Capacity   int64
	// contains filtered or unexported fields
}

func (*MegaRaid) CleanRaid

func (raid *MegaRaid) CleanRaid() error

func (*MegaRaid) GetAdapters

func (raid *MegaRaid) GetAdapters() []raiddrivers.IRaidAdapter

func (*MegaRaid) GetName

func (raid *MegaRaid) GetName() string

func (*MegaRaid) GetStorcliAdaptor

func (raid *MegaRaid) GetStorcliAdaptor() ([]*StorcliAdaptor, map[string]*StorcliAdaptor, error)

func (*MegaRaid) ParsePhyDevs

func (raid *MegaRaid) ParsePhyDevs() error

func (*MegaRaid) PreBuildRaid

func (raid *MegaRaid) PreBuildRaid(_ []*api.BaremetalDiskConfig, _ int) error

func (*MegaRaid) RemoveLogicVolumes

func (raid *MegaRaid) RemoveLogicVolumes()

type MegaRaidAdaptor

type MegaRaidAdaptor struct {
	// contains filtered or unexported fields
}

func NewMegaRaidAdaptor

func NewMegaRaidAdaptor(index int, raid *MegaRaid) (*MegaRaidAdaptor, error)

func NewMegaRaidAdaptorByStorcli

func NewMegaRaidAdaptorByStorcli(storAda *StorcliAdaptor, raid *MegaRaid) (*MegaRaidAdaptor, error)

func (*MegaRaidAdaptor) AddPhyDev

func (adapter *MegaRaidAdaptor) AddPhyDev(dev *MegaRaidPhyDev)

func (*MegaRaidAdaptor) BuildNoneRaid

func (adapter *MegaRaidAdaptor) BuildNoneRaid(devs []*baremetal.BaremetalStorage) error

func (*MegaRaidAdaptor) BuildRaid0

func (adapter *MegaRaidAdaptor) BuildRaid0(devs []*baremetal.BaremetalStorage, conf *api.BaremetalDiskConfig) error

func (*MegaRaidAdaptor) BuildRaid1

func (adapter *MegaRaidAdaptor) BuildRaid1(devs []*baremetal.BaremetalStorage, conf *api.BaremetalDiskConfig) error

func (*MegaRaidAdaptor) BuildRaid10

func (adapter *MegaRaidAdaptor) BuildRaid10(devs []*baremetal.BaremetalStorage, conf *api.BaremetalDiskConfig) error

func (*MegaRaidAdaptor) BuildRaid5

func (adapter *MegaRaidAdaptor) BuildRaid5(devs []*baremetal.BaremetalStorage, conf *api.BaremetalDiskConfig) error

func (*MegaRaidAdaptor) GetDevices

func (adapter *MegaRaidAdaptor) GetDevices() []*baremetal.BaremetalStorage

func (*MegaRaidAdaptor) GetIndex

func (adapter *MegaRaidAdaptor) GetIndex() int

func (*MegaRaidAdaptor) GetLogicVolumes

func (adapter *MegaRaidAdaptor) GetLogicVolumes() ([]*raiddrivers.RaidLogicalVolume, error)

func (*MegaRaidAdaptor) GetStorcliCommand

func (adapter *MegaRaidAdaptor) GetStorcliCommand(args ...string) (string, error)

func (*MegaRaidAdaptor) PostBuildRaid

func (adapter *MegaRaidAdaptor) PostBuildRaid() error

func (*MegaRaidAdaptor) PreBuildRaid

func (adapter *MegaRaidAdaptor) PreBuildRaid(confs []*api.BaremetalDiskConfig) error

func (*MegaRaidAdaptor) RemoveLogicVolumes

func (adapter *MegaRaidAdaptor) RemoveLogicVolumes() error

type MegaRaidPhyDev

type MegaRaidPhyDev struct {
	*raiddrivers.RaidBasePhyDev
	// contains filtered or unexported fields
}

func NewMegaRaidPhyDev

func NewMegaRaidPhyDev() *MegaRaidPhyDev

func (*MegaRaidPhyDev) GetSize

func (dev *MegaRaidPhyDev) GetSize() int64

func (*MegaRaidPhyDev) ToBaremetalStorage

func (dev *MegaRaidPhyDev) ToBaremetalStorage(index int) *baremetal.BaremetalStorage

type PerccliAdaptor

type PerccliAdaptor struct {
	*StorcliAdaptor
	// contains filtered or unexported fields
}

func (*PerccliAdaptor) BuildNoneRaid

func (a *PerccliAdaptor) BuildNoneRaid(devs []*baremetal.BaremetalStorage) error

func (*PerccliAdaptor) BuildRaid0

func (*PerccliAdaptor) BuildRaid1

func (*PerccliAdaptor) BuildRaid10

func (*PerccliAdaptor) BuildRaid5

func (*PerccliAdaptor) ClearJBODDisks

func (a *PerccliAdaptor) ClearJBODDisks(devs []*MegaRaidPhyDev)

func (*PerccliAdaptor) GetIndex

func (a *PerccliAdaptor) GetIndex() int

func (*PerccliAdaptor) GetLogicVolumes

func (a *PerccliAdaptor) GetLogicVolumes() ([]*raid.RaidLogicalVolume, error)

func (*PerccliAdaptor) GetPhyDevs

func (a *PerccliAdaptor) GetPhyDevs() ([]*MegaRaidPhyDev, error)

func (*PerccliAdaptor) IsComplete

func (a *PerccliAdaptor) IsComplete() bool

func (*PerccliAdaptor) Key

func (a *PerccliAdaptor) Key() string

func (*PerccliAdaptor) ParseLine

func (a *PerccliAdaptor) ParseLine(line string)

func (*PerccliAdaptor) RemoveLogicVolumes

func (a *PerccliAdaptor) RemoveLogicVolumes() error

type PerccliPhyDev

type PerccliPhyDev struct {
	*StorcliPhysicalDrive
}

func NewPerccliPhyDev

func NewPerccliPhyDev(base *StorcliPhysicalDrive) *PerccliPhyDev

type StorcliAdaptor

type StorcliAdaptor struct {
	Controller int
	// contains filtered or unexported fields
}

func (*StorcliAdaptor) String

func (a *StorcliAdaptor) String() string

type StorcliControllerData

type StorcliControllerData struct {
	Info []*StorcliPhysicalDrive `json:"Drive Information"`
}

type StorcliControllerInfo

type StorcliControllerInfo struct {
	CommandStatus struct {
		CliVersion      string `json:"CLI Version"`
		OperatingSystem string `json:"Operating system"`
		Controller      int    `json:"Controller"`
		Status          string `json:"Status"`
	} `json:"Command Status"`
	ResponseData StorcliControllerData `json:"Response Data"`
}

type StorcliControllersInfo

type StorcliControllersInfo struct {
	Controllers []*StorcliControllerInfo `json:"Controllers"`
}

type StorcliLogicalVolume

type StorcliLogicalVolume struct {
	// Name format "/c0/v0"
	Name string
	// "TYPE": "RAID0"
	Type string `json:"Type"`
	// "DG/VD": "0/0"
	DGVD string `json:"DG/VD"`
	// "Size": "446.625GB"
	Size string `json:"Size"`
	// PDs for VD
	PDs []*StorcliLogicalVolumePD
	// Properties
	Properties *StorcliLogicalVolumeProperties
	// index
	Index int
}

func (*StorcliLogicalVolume) GetOSDevice

func (lv *StorcliLogicalVolume) GetOSDevice() string

func (*StorcliLogicalVolume) GetSysBlockRotationalPath

func (lv *StorcliLogicalVolume) GetSysBlockRotationalPath() string

func (*StorcliLogicalVolume) IsSSD

func (lv *StorcliLogicalVolume) IsSSD() bool

type StorcliLogicalVolumePD

type StorcliLogicalVolumePD struct {
	// "EID:Slt": "8:0"
	EIDSlt string `json:"EID:Slt"`
	// "Size": "446.625GB"
	Size string `json:"Size"`
	// "Intf": "SATA"
	Intf string `json:"Intf"`
	// "MED": "SSD"
	Med string `json:"Med"`
	// "Model": "SAMSUNG MZ7LH480HAHQ-00005"
	Model string `json:"Model"`
}

type StorcliLogicalVolumeProperties

type StorcliLogicalVolumeProperties struct {
	// "Strip Size": "256 KB"
	StripSize string `json:"Strip Size"`
	// "OS Drive Name": "/dev/sda"
	DeviceName string `json:"OS Drive Name"`
}

type StorcliLogicalVolumes

type StorcliLogicalVolumes struct {
	// contains filtered or unexported fields
}

func (*StorcliLogicalVolumes) GetLogicalVolumes

func (lvs *StorcliLogicalVolumes) GetLogicalVolumes(controller int) ([]*StorcliLogicalVolume, error)

type StorcliPhysicalDrive

type StorcliPhysicalDrive struct {
	EnclosureIdSlotNo   string `json:"EID:Slt"`
	DeviceId            string `json:"DID"`
	State               string `json:"State"`
	DriveGroup          string `json:"DG"`
	Size                string `json:"Size"`
	Interface           string `json:"Intf"`
	MediaType           string `json:"Med"`
	SelfEncryptiveDrive string `json:"SED"`
	ProtectionInfo      string `json:"PI"`
	SectorSize          string `json:"SeSz"`
	Model               string `json:"Model"`
	Spun                string `json:"Sp"`
	Type                string `json:"Type"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL