iscsi

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

README

CSI ISCSI driver

Usage:

Start ISCSI driver
$ sudo ./_output/iscsidriver --endpoint tcp://127.0.0.1:10000 --nodeid CSINode
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
"ISCSI"	"0.1.0"
NodePublish a volume
$ export ISCSI_TARGET="iSCSI Target Server IP (Ex: 10.10.10.10)"
$ export IQN="Target IQN"
$ csc node publish --endpoint tcp://127.0.0.1:10000 --target-path /mnt/iscsi --attrib targetPortal=$ISCSI_TARGET --attrib iqn=$IQN --attrib lun=<lun-id> iscsitestvol
iscsitestvol
NodeUnpublish a volume
$ csc node unpublish --endpoint tcp://127.0.0.1:10000 --target-path /mnt/iscsi iscsitestvol
iscsitestvol
Get NodeID
$ csc node get-id --endpoint tcp://127.0.0.1:10000
CSINode

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDriver

func NewDriver(nodeID, endpoint string) *driver

func NewNodeServer

func NewNodeServer(d *driver) *nodeServer

Types

type GlobFunc

type GlobFunc func(string) ([]string, error)

type ISCSIUtil

type ISCSIUtil struct{}

func (*ISCSIUtil) AttachDisk

func (util *ISCSIUtil) AttachDisk(b iscsiDiskMounter) (string, error)

func (*ISCSIUtil) DetachDisk

func (util *ISCSIUtil) DetachDisk(c iscsiDiskUnmounter, targetPath string) error

type StatFunc

type StatFunc func(string) (os.FileInfo, error)

stat a path, if not exists, retry maxRetries times when iscsi transports other than default are used, use glob instead as pci id of device is unknown

Jump to

Keyboard shortcuts

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