qbd

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CmdQbd string = "qbd"
	CmdDd  string = "dd"
)

Variables

This section is empty.

Functions

func AttachVolume

func AttachVolume(confFile, protocol, poolName, volName string) error

AttachVolume attach volume to current node Input:

configFile: string, qbd config file
protocol: string, rdma or tcp
poolName: string
volName: string

Return:

not nil: failed to attach volume
nil: succeed to attach volume

func DetachVolume

func DetachVolume(confFile, protocol, poolName, volName string) error

DetachVolume detach volume from current node Input:

configFile: string, qbd config file
protocol: string, rdma or tcp
poolName: string
volName: string

Return:

not nil: failed to detach volume
nil: succeed to detach volume

func GetDevice added in v1.2.0

func GetDevice(confFile, poolName, volumeName string) (string, error)

GetDevice return device name of volume

Types

type AttachInfo

type AttachInfo struct {
	Id        string
	Name      string
	Device    string
	Pool      string
	ReadBps   int64
	WriteBps  int64
	ReadIops  int64
	WriteIops int64
}

func ListVolume

func ListVolume(confFile, poolName, volName string) (*AttachInfo, error)

ListVolume get attachment volume info Input:

volume name: string

Return cases:

info, nil: found attached volume
nil, nil: not found attached volume
nil, err: return error

Jump to

Keyboard shortcuts

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