lvm

package
v0.0.0-...-9e299b5 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2021 License: Apache-2.0 Imports: 29 Imported by: 0

README

CSI Hostpath driver

Usage:

Build hostpathplugin
$ make hostpath
Start Hostpath driver
$ sudo ./_output/hostpathplugin --endpoint tcp://127.0.0.1:10000 --nodeid CSINode -v=5
Test using csc

Get csc tool from https://github.com/rexray/gocsi/tree/master/csc

Get plugin info
$ csc identity plugin-info --endpoint tcp://127.0.0.1:10000
"csi-hostpath"  "0.1.0"
Create a volume
$ csc controller new --endpoint tcp://127.0.0.1:10000 --cap 1,block CSIVolumeName
CSIVolumeID
Delete a volume
$ csc controller del --endpoint tcp://127.0.0.1:10000 CSIVolumeID
CSIVolumeID
Validate volume capabilities
$ csc controller validate-volume-capabilities --endpoint tcp://127.0.0.1:10000 --cap 1,block CSIVolumeID
CSIVolumeID  true
NodePublish a volume
$ csc node publish --endpoint tcp://127.0.0.1:10000 --cap 1,block --target-path /mnt/hostpath CSIVolumeID
CSIVolumeID
NodeUnpublish a volume
$ csc node unpublish --endpoint tcp://127.0.0.1:10000 --target-path /mnt/hostpath CSIVolumeID
CSIVolumeID
Get NodeID
$ csc node get-id --endpoint tcp://127.0.0.1:10000
CSINode

Documentation

Index

Constants

View Source
const (

	// NsenterCmd is the nsenter command
	NsenterCmd = "nsenter --mount=/proc/1/ns/mnt"
	// VgNameTag is the vg name tag
	VgNameTag = "vgName"

	SecretNameTag      = "secretname"
	SecretNamespaceTag = "secretnamespace"
	S3EndPointTag      = "s3endpoint"

	// LvmTypeTag is the lvm type tag
	LvmTypeTag = "lvmType"
	// NodeAffinity is the pv node schedule tag
	NodeAffinity = "nodeAffinity"

	// LinearType linear type
	LinearType = "linear"
	// StripingType striping type
	StripingType = "striping"

	// TopologyNodeKey tag
	TopologyNodeKey = "topology.hostpath.csi/node"
)
View Source
const (
	FsTypeTag = "fsType"
	DefaultFs = "ext4"
)
View Source
const TopologyKeyNode = "topology.hostpath.csi/node"

Variables

This section is empty.

Functions

func NewControllerServer

func NewControllerServer(nodeID string) *controllerServer

func NewHostPathDriver

func NewHostPathDriver(driverName, nodeID, endpoint string, maxVolumesPerNode int64, version string) (*hostPath, error)

func NewIdentityServer

func NewIdentityServer(name, version string) *identityServer

func NewNodeServer

func NewNodeServer(nodeId string, maxVolumesPerNode int64) *nodeServer

func NewNonBlockingGRPCServer

func NewNonBlockingGRPCServer() *nonBlockingGRPCServer

Types

This section is empty.

Jump to

Keyboard shortcuts

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