Documentation ¶
Index ¶
- Constants
- Variables
- func EnsureFolder(target string) error
- func GetNameSpaceCapacity(ns *PmemNameSpace) int64
- func MaintainDirect(regions *PmemRegions) error
- func MaintainKMEM(regions *PmemRegions) error
- func MaintainLVM(regions *PmemRegions) error
- func MaintainPMEM(pmemType string, mounter k8smount.Interface) error
- func MaintainQuotaPath(regions *PmemRegions, mounter k8smount.Interface) error
- type DaxctrlMem
- type PmemNameSpace
- type PmemRegion
- type PmemRegions
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 GetNameSpaceCapacity ¶
func GetNameSpaceCapacity(ns *PmemNameSpace) int64
GetNameSpaceCapacity get namespace size
func MaintainKMEM ¶
func MaintainKMEM(regions *PmemRegions) error
MaintainKMEM create kmem type namespace
func MaintainPMEM ¶
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
Click to show internal directories.
Click to hide internal directories.