lvm

package
v0.1.30 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogicalVolume

type LogicalVolume struct {
	Name        string
	Size        int64
	PercentVG   int
	VolumeGroup *VolumeGroup

	Vars map[string]string

	Log logr.Logger
}

func NewLogicalVolume

func NewLogicalVolume(ctx context.Context, name string, vg *VolumeGroup, size int64, percentVG int, log logr.Logger) *LogicalVolume

func (*LogicalVolume) Activate

func (lv *LogicalVolume) Activate(ctx context.Context, rawArgs string) (bool, error)

func (*LogicalVolume) Change

func (lv *LogicalVolume) Change(ctx context.Context, rawArgs string) (bool, error)

func (*LogicalVolume) Create

func (lv *LogicalVolume) Create(ctx context.Context, rawArgs string) (bool, error)

func (*LogicalVolume) Deactivate

func (lv *LogicalVolume) Deactivate(ctx context.Context, rawArgs string) (bool, error)

func (*LogicalVolume) Exists added in v0.1.16

func (lv *LogicalVolume) Exists(ctx context.Context) (bool, error)

Exists determines if the LV exists in the OS

func (*LogicalVolume) IsHealthy added in v0.1.26

func (lv *LogicalVolume) IsHealthy(ctx context.Context) (bool, error)

func (*LogicalVolume) IsSynced added in v0.1.26

func (lv *LogicalVolume) IsSynced(ctx context.Context) (bool, error)

func (*LogicalVolume) ParseArgs added in v0.1.29

func (lv *LogicalVolume) ParseArgs(args string) (string, error)

func (*LogicalVolume) Remove

func (lv *LogicalVolume) Remove(ctx context.Context, rawArgs string) (bool, error)

func (*LogicalVolume) Repair added in v0.1.26

func (lv *LogicalVolume) Repair(ctx context.Context, rawArgs string) (bool, error)

type PhysicalVolume

type PhysicalVolume struct {
	Device string

	Vars map[string]string

	Log logr.Logger
}

func NewPhysicalVolume

func NewPhysicalVolume(ctx context.Context, device string, log logr.Logger) *PhysicalVolume

func (*PhysicalVolume) Create

func (pv *PhysicalVolume) Create(ctx context.Context, rawArgs string) (bool, error)

func (*PhysicalVolume) Remove

func (pv *PhysicalVolume) Remove(ctx context.Context, rawArgs string) (bool, error)

type VolumeGroup

type VolumeGroup struct {
	Name            string
	PhysicalVolumes []*PhysicalVolume
	Shared          bool

	Vars map[string]string

	Log logr.Logger
}

func NewVolumeGroup

func NewVolumeGroup(ctx context.Context, name string, pvs []*PhysicalVolume, log logr.Logger) *VolumeGroup

NewVolumeGroup returns a VolumeGroup for operations.

func (*VolumeGroup) Change

func (vg *VolumeGroup) Change(ctx context.Context, rawArgs string) (bool, error)

func (*VolumeGroup) Create

func (vg *VolumeGroup) Create(ctx context.Context, rawArgs string) (bool, error)

func (*VolumeGroup) Exists

func (vg *VolumeGroup) Exists(ctx context.Context) (bool, error)

Exists determines if the VG exists in the OS

func (*VolumeGroup) Extend added in v0.1.26

func (vg *VolumeGroup) Extend(ctx context.Context, rawArgs string) (bool, error)

func (*VolumeGroup) LockStart

func (vg *VolumeGroup) LockStart(ctx context.Context, rawArgs string) (bool, error)

func (*VolumeGroup) LockStop

func (vg *VolumeGroup) LockStop(ctx context.Context, rawArgs string) (bool, error)

func (*VolumeGroup) NumLVs added in v0.1.17

func (vg *VolumeGroup) NumLVs(ctx context.Context) (int, error)

func (*VolumeGroup) Reduce added in v0.1.26

func (vg *VolumeGroup) Reduce(ctx context.Context, rawArgs string) (bool, error)

func (*VolumeGroup) Remove

func (vg *VolumeGroup) Remove(ctx context.Context, rawArgs string) (bool, error)

func (*VolumeGroup) WaitForAppearance added in v0.1.5

func (vg *VolumeGroup) WaitForAppearance(ctx context.Context) (bool, error)

WaitForAppearance checks the existence of the VG and waits a brief time for the VG to be created if it is not present. This intentionally fails quickly to trigger an NVMe namespace rescan, relying on the controller's exponential backoff for retries.

Jump to

Keyboard shortcuts

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