Versions in this module Expand all Collapse all v0 v0.1.0 Aug 19, 2022 Changes in this version + const ErrInvalidLVName + const ErrInvalidVGName + const ErrLogicalVolumeNotFound + const ErrNoSpace + const ErrPhysicalVolumeNotFound + const ErrTagHasInvalidChars + const ErrTagInvalidLength + const ErrTooFewDisks + const ErrVolumeGroupNotFound + const MaxSize + var Verbose bool + var VolumeTypeDefault VolumeType + var VolumeTypeLinear = VolumeType + var VolumeTypeRAID1 = VolumeType + func IsLogicalVolumeNotFound(err error) bool + func IsPhysicalVolumeNotFound(err error) bool + func IsVolumeGroupNotFound(err error) bool + func LVMatchTag(tag string) func(lvsItem) bool + func ListVolumeGroupNames() ([]string, error) + func ListVolumeGroupUUIDs() ([]string, error) + func PVScan(dev string) error + func SetLockFilePath(filepath string) + func SetLogger(l logger) + func VGScan(name string) error + func ValidateLogicalVolumeName(name string) error + func ValidateTag(tag string) error + func ValidateVolumeGroupName(name string) error + type CleanupSteps []func() error + func (fns *CleanupSteps) Add(fn func() error) + func (fns *CleanupSteps) Unwind() + type CreateLogicalVolumeOpt func(opts *LVOpts) + func VolumeLayoutOpt(r VolumeLayout) CreateLogicalVolumeOpt + type LVOpts struct + func (o LVOpts) Flags() (opts []string) + type LinearConfig struct + func (c LinearConfig) Flags() (fs []string) + type LogicalVolume struct + func (lv *LogicalVolume) Extend(size string, resizeFS bool) error + func (lv *LogicalVolume) ExtendWithLogicalExtents(extend string, resizeFS bool) error + func (lv *LogicalVolume) Name() string + func (lv *LogicalVolume) Path() (string, error) + func (lv *LogicalVolume) Remove() error + func (lv *LogicalVolume) SizeInBytes() uint64 + func (lv *LogicalVolume) Tags() ([]string, error) + type LoopDevice struct + func CreateLoopDevice(size uint64) (device *LoopDevice, err error) + func (d *LoopDevice) Close() error + func (d *LoopDevice) Path() string + func (d *LoopDevice) String() string + type PhysicalVolume struct + func CreatePhysicalVolume(dev string) (*PhysicalVolume, error) + func ListPhysicalVolumes() ([]*PhysicalVolume, error) + func LookupPhysicalVolume(name string) (*PhysicalVolume, error) + func (pv *PhysicalVolume) Check() error + func (pv *PhysicalVolume) Remove() error + type VolumeGroup struct + func CreateVolumeGroup(name string, pvs []*PhysicalVolume, tags []string) (*VolumeGroup, error) + func LookupVolumeGroup(name string) (*VolumeGroup, error) + func (vg *VolumeGroup) BytesFree(raid VolumeLayout) (uint64, error) + func (vg *VolumeGroup) BytesTotal() (uint64, error) + func (vg *VolumeGroup) Check() error + func (vg *VolumeGroup) CreateLogicalVolume(name string, sizeInBytes uint64, tags []string, defaultYes bool, ...) (*LogicalVolume, error) + func (vg *VolumeGroup) ExtentCount() (uint64, error) + func (vg *VolumeGroup) ExtentFreeCount(raid VolumeLayout) (uint64, error) + func (vg *VolumeGroup) ExtentSize() (uint64, error) + func (vg *VolumeGroup) FindLogicalVolume(matchFirst func(lvsItem) bool) (*LogicalVolume, error) + func (vg *VolumeGroup) ListLogicalVolumeNames() ([]string, error) + func (vg *VolumeGroup) ListPhysicalVolumeNames() ([]string, error) + func (vg *VolumeGroup) LookupLogicalVolume(name string) (*LogicalVolume, error) + func (vg *VolumeGroup) Name() string + func (vg *VolumeGroup) Remove() error + func (vg *VolumeGroup) Tags() ([]string, error) + type VolumeLayout struct + Mirrors uint64 + StripeSize uint64 + Stripes uint64 + Type VolumeType + func (c VolumeLayout) Flags() (fs []string) + func (c VolumeLayout) MinNumberOfDevices() uint64 + type VolumeType struct