lvm

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 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

	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) Remove

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

type PhysicalVolume

type PhysicalVolume struct {
	Device 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

	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) 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) 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

Jump to

Keyboard shortcuts

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