commands

package
v0.0.0-...-8469aa6 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const ProtectedTagName = "protected"

ProtectedTagName is a tag that prevents RemoveLV & RemoveVG from removing a volume

Variables

This section is empty.

Functions

func AddTagLV

func AddTagLV(ctx context.Context, vg string, name string, tags []string) (string, error)

AddTagLV add Volume Group tag

func CloneLV

func CloneLV(ctx context.Context, src, dest string) (string, error)

CloneLV clones a volume via dd

func CreateLV

func CreateLV(ctx context.Context, vg string, name string, size uint64, mirrors uint32, tags []string) (string, error)

CreateLV creates a new volume

func CreatePV

func CreatePV(ctx context.Context, block string) (string, error)

CreatePV create physics volume

func CreateVG

func CreateVG(ctx context.Context, name string, physicalVolume string, tags []string) (string, error)

CreateVG create a Volume Group

func Destory

func Destory(ctx context.Context, block string) (string, error)

Destory destory block

func ExtendLV

func ExtendLV(ctx context.Context, size string, name string) (string, error)

ExtendLV extend lv

func ExtendVG

func ExtendVG(ctx context.Context, name string, physicalVolume string) (string, error)

ExtendVG extend a Volume Group

func GetPVNum

func GetPVNum(ctx context.Context, name string) (string, error)

GetPVNum get number of physics volume

func ListLV

func ListLV(ctx context.Context, listspec string) ([]*parser.LV, error)

ListLV lists lvm volumes

func ListPV

func ListPV(ctx context.Context) ([]*parser.PV, error)

ListPV list physics volume

func ListVG

func ListVG(ctx context.Context) ([]*parser.VG, error)

ListVG lists lvm vg

func Match

func Match(ctx context.Context, block string) string

Match match block

func ReduceVG

func ReduceVG(ctx context.Context, name string, physicalVolume string) (string, error)

ReduceVG reduce a Volume Group

func RemoveLV

func RemoveLV(ctx context.Context, vg string, name string) (string, error)

RemoveLV removes a volume

func RemovePV

func RemovePV(ctx context.Context, block string) (string, error)

RemovePV remove physics volume

func RemoveTagLV

func RemoveTagLV(ctx context.Context, vg string, name string, tags []string) (string, error)

RemoveTagLV remove Volume Group tag

func RemoveVG

func RemoveVG(ctx context.Context, name string) (string, error)

RemoveVG remove a Volume Group

func Validate

func Validate(ctx context.Context, block string) (bool, error)

Validate validate block

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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