lvmutils

package
v0.3.11-8 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2024 License: Apache-2.0 Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DmCreate

func DmCreate(lv1, lv2, dmName string) error

func DmRemove

func DmRemove(dmPath string) error

@param: dmPath string: should like /dev/mapper/<device>

func ExtendLvSize

func ExtendLvSize(vg string, size int64) (int64, error)

func GetLvNames

func GetLvNames(vg string) ([]string, error)

func GetLvOrigin

func GetLvOrigin(lvPath string) (string, error)

func GetLvSize

func GetLvSize(lvPath string) (int64, error)

get lvsize unit byte

func GetQcow2LvSize

func GetQcow2LvSize(sizeMb int64) int64

func LVActive

func LVActive(lvPath string, share, exclusive bool) error

func LVDeactivate

func LVDeactivate(lvPath string) error

func LvCreate

func LvCreate(vg, lv string, size int64) error

func LvCreateFromSnapshot

func LvCreateFromSnapshot(lv, snapShotPath string, size int64) error

func LvIsActivated

func LvIsActivated(lvPath string) (bool, error)

func LvRemove

func LvRemove(lvPath string) error

@param: lvPath string: should like /dev/<vg>/<lv>

func LvRename

func LvRename(vgName, oldName, newName string) error

func LvResize

func LvResize(vg, lvPath string, size int64) error

@param: lvPath string: should like /dev/<vg>/<lv>

func LvScan

func LvScan() error

func VgActive

func VgActive(vgName string, active bool) error

func VgDisplay

func VgDisplay(vgName string) error

Types

type LvActive

type LvActive struct {
	Report []struct {
		LV []struct {
			LvActive string `json:"lv_active"`
		} `json:"lv"`
	} `json:"report"`
}

type LvNames

type LvNames struct {
	Report []struct {
		LV []struct {
			LVName string `json:"lv_name"`
		} `json:"lv"`
	} `json:"report"`
}

type LvOrigin

type LvOrigin struct {
	Report []struct {
		LV []struct {
			Origin string `json:"origin"`
		} `json:"lv"`
	} `json:"report"`
}

type VgReports

type VgReports struct {
	Report []struct {
		VG []struct {
			VgSize       string `json:"vg_size"`
			VgFree       string `json:"vg_free"`
			VgExtentSize string `json:"vg_extent_size"`
		} `json:"vg"`
	} `json:"report"`
}

Jump to

Keyboard shortcuts

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