volume

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// VolumeOperator is the name of the tool that makes volume-related operations.
	VolumeOperator = "iscsi"
)

Variables

View Source
var FileOperatorVar util.FileOperator

FileOperatorVar is used for doing File Operations

View Source
var UnixSockVar util.UnixSock

UnixSockVar is used for communication through Unix Socket

Functions

func CheckValidVolume

func CheckValidVolume(cStorVolume *apis.CStorVolume) error

CheckValidVolume checks for validity of CStorVolume resource.

func CreateIstgtConf

func CreateIstgtConf(cStorVolume *apis.CStorVolume) ([]byte, error)

CreateIstgtConf creates istgt.conf file

func CreateVolumeTarget

func CreateVolumeTarget(cStorVolume *apis.CStorVolume) error

CreateVolumeTarget creates a new cStor volume istgt config.

func ExecuteDesiredReplicationFactorCommand

func ExecuteDesiredReplicationFactorCommand(
	cStorVolume *apis.CStorVolume,
	getDRFCmd func(*apis.CStorVolume) string) error

ExecuteDesiredReplicationFactorCommand executes istgtcontrol command to update desired replication factor

func GetScaleDownCommand

func GetScaleDownCommand(cStorVolume *apis.CStorVolume) string

GetScaleDownCommand return replica scale down command Ex command: drf <vol_name> <value> <known replica list>

func GetScaleUpCommand

func GetScaleUpCommand(cstorVolume *apis.CStorVolume) string

GetScaleUpCommand will return data required to execute istgtcontrol drf command Ex command: drf <vol_name> <value>

func GetVolumeStatus

func GetVolumeStatus(cStorVolume *apis.CStorVolume) (*apis.CVStatus, error)

GetVolumeStatus retrieves an array of replica statuses.

func ResizeTargetVolume

func ResizeTargetVolume(cStorVolume *apis.CStorVolume) error

ResizeTargetVolume sends resize volume command to istgt and get the response

Types

This section is empty.

Jump to

Keyboard shortcuts

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