logicalvolumegetter

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeviceNameToDevicePath

func DeviceNameToDevicePath(deviceName string) string

Types

type ExportDetails

type ExportDetails struct {
	RaidLevel   string   // MD_LEVEL
	Devices     int      // MD_DEVICES
	Metadata    string   // MD_METADATA
	UUID        string   // MD_UUID
	Name        string   // MD_NAME
	ArraySize   string   // MD_ARRAY_SIZE
	DeviceName  string   // MD_DEVNAME
	DevicePaths []string // MD_DEV_0, MD_DEV_1, ...
}

type MDADM

type MDADM struct {
	MDADM commandrunner.CommandRunner
}

func NewMDADM

func NewMDADM(
	runner *commandrunner.MDADM,
) *MDADM

func (*MDADM) LogicalVolume

func (m *MDADM) LogicalVolume(
	metadata *logicalvolume.Metadata,
) (*logicalvolume.LogicalVolume, error)

LogicalVolume returns a logical volume by its metadata.

func (*MDADM) LogicalVolumes

func (m *MDADM) LogicalVolumes(
	_ *raidcontroller.Metadata,
) ([]*logicalvolume.LogicalVolume, error)

LogicalVolumes returns all the logical volumes on the system.

type MDADMDevices

type MDADMDevices struct {
	Role  string
	State string
	Path  string
}

type MDADMExportDetails

type MDADMExportDetails struct {
	RaidLevel    logicalvolume.RAIDLevel // MD_LEVEL
	DevicesCount int                     // MD_DEVICES
	Metadata     string                  // MD_METADATA
	UUID         string                  // MD_UUID
	Name         string                  // MD_NAME
	ArraySize    string                  // MD_ARRAY_SIZE
	DeviceName   string                  // MD_DEVNAME
	Devices      map[string]MDADMDevices // MD_DEV_0, MD_DEV_1, ...
}

func ParseMDADMExportOutput

func ParseMDADMExportOutput(output []byte) ([]*MDADMExportDetails, error)

type SSACLI

type SSACLI struct {
	SSACLI commandrunner.CommandRunner
	LSBLK  commandrunner.CommandRunner
}

func NewSSACLI

func NewSSACLI(
	ssacli *commandrunner.SSACLI,
	lsblk *commandrunner.LSBLK,
) *SSACLI

func (*SSACLI) LogicalVolume

func (s *SSACLI) LogicalVolume(metadata *logicalvolume.Metadata) (
	*logicalvolume.LogicalVolume,
	error,
)

LogicalVolume returns a logical volume for a given metadata.

func (*SSACLI) LogicalVolumes

func (s *SSACLI) LogicalVolumes(metadata *raidcontroller.Metadata) (
	[]*logicalvolume.LogicalVolume,
	error,
)

LogicalVolumes returns all logical volumes for a given controller.

Jump to

Keyboard shortcuts

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