commands

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NsenterCmd is the nsenter command
	NsenterCmd = "/nsenter --mount=/proc/1/ns/mnt "
)
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 tag

func CleanPath

func CleanPath(ctx context.Context, path string) error

CleanPath deletes all the contents under the given directory

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 CreateVG

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

CreateVG create volume group

func ListLV

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

ListLV lists lvm volumes

func ListVG

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

ListVG get vg info

func RemoveLV

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

RemoveLV removes a volume

func RemoveTagLV

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

RemoveTagLV remove tag

func RemoveVG

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

RemoveVG remove volume group

func Run

func Run(cmd string) (string, error)

Run run shell command

Types

This section is empty.

Jump to

Keyboard shortcuts

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