manager

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PmemVolumeGroupNameRegion0 tag
	PmemVolumeGroupNameRegion0 = "pmemvgregion0"
	// PmemVolumeGroupNameRegion1 tag
	PmemVolumeGroupNameRegion1 = "pmemvgregion1"
	// PmemVolumeGroupNamePrefix ...
	PmemVolumeGroupNamePrefix = "pmemvg"
	// PmemRegionNameDefault tag
	PmemRegionNameDefault = "region0"
)
View Source
const (
	// NsenterCmd is the nsenter command
	NsenterCmd = "/nsenter --mount=/proc/1/ns/mnt --ipc=/proc/1/ns/ipc --net=/proc/1/ns/net --uts=/proc/1/ns/uts "
)

Variables

View Source
var ErrParse = errors.New("Cannot parse output of blkid")

ErrParse is an error that is returned when parse operation fails

Functions

func EnsureFolder

func EnsureFolder(target string) error

EnsureFolder ...

func GetNameSpaceCapacity

func GetNameSpaceCapacity(ns *PmemNameSpace) int64

GetNameSpaceCapacity get namespace size

func MaintainDirect

func MaintainDirect(regions *PmemRegions) error

MaintainDirect direct pmem

func MaintainKMEM

func MaintainKMEM(regions *PmemRegions) error

MaintainKMEM create kmem type namespace

func MaintainLVM

func MaintainLVM(regions *PmemRegions) error

MaintainLVM lvm pmem

func MaintainPMEM

func MaintainPMEM(pmemType string, mounter k8smount.Interface) error

MaintainPMEM build pmem device

func MaintainQuotaPath

func MaintainQuotaPath(regions *PmemRegions, mounter k8smount.Interface) error

MaintainQuotaPath maintain project quota file system

Types

type DaxctrlMem

type DaxctrlMem struct {
	Chardev    string `json:"chardev"`
	Size       int64  `json:"size"`
	TargetNode int    `json:"target_node"`
	Mode       string `json:"mode"`
	Movable    bool   `json:"movable"`
}

DaxctrlMem list all mems

type PmemNameSpace

type PmemNameSpace struct {
	Dev        string `json:"dev,omitempty"`
	Mode       string `json:"mode,omitempty"`
	MapType    string `json:"map,omitempty"`
	Size       int64  `json:"size,omitempty"`
	UUID       string `json:"uuid,omitempty"`
	SectorSize int64  `json:"sectorsize,omitempty"`
	Align      int64  `json:"align,omitempty"`
	BlockDev   string `json:"blockdev,omitempty"`
	CharDev    string `json:"chardev,omitempty"`
	Name       string `json:"name,omitempty"`
}

PmemNameSpace define one pmem namespaces

func GetNameSpace

func GetNameSpace(namespaceName string) (*PmemNameSpace, error)

GetNameSpace get namespace info

func (*PmemNameSpace) ToProto

func (pns *PmemNameSpace) ToProto() *lib.NameSpace

ToProto build NameSpace object

type PmemRegion

type PmemRegion struct {
	Dev               string          `json:"dev"`
	Size              int64           `json:"size,omitempty"`
	AvailableSize     int64           `json:"available_size,omitempty"`
	MaxAvailableExent int64           `json:"max_available_extent,omitempty"`
	RegionType        string          `json:"type,omitempty"`
	IsetID            int64           `json:"iset_id,omitempty"`
	PersistenceDomain string          `json:"persistence_domain,omitempty"`
	Namespaces        []PmemNameSpace `json:"namespaces,omitempty"`
}

PmemRegion define on pmem region

type PmemRegions

type PmemRegions struct {
	Regions []PmemRegion `json:"regions"`
}

PmemRegions list all regions

func GetRegions

func GetRegions() (*PmemRegions, error)

GetRegions get regions info

Jump to

Keyboard shortcuts

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