iscsi

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResizeVolume

func ResizeVolume(volumePath string, vol *apis.CStorVolumeAttachment) error

ResizeVolume rescans the iSCSI session and runs the resize to filesystem command on that particular device

func Unmount

func Unmount(path string) error

Unmount unmounts the path provided

func UnmountAndDetachDisk

func UnmountAndDetachDisk(vol *apis.CStorVolumeAttachment, path string) error

UnmountAndDetachDisk unmounts the disk from the specified path and logs out of the iSCSI Volume

Types

type GlobFunc

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

GlobFunc returns an array of string

type ISCSIUtil

type ISCSIUtil struct{}

ISCSIUtil is an empty struct type

func (*ISCSIUtil) AttachDisk

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

AttachDisk logs in to the iSCSI volume and returns the corresponding diskPath of the volume which gets created on the node

func (*ISCSIUtil) DetachDisk

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

DetachDisk logs out of the iSCSI volume and the corresponding path is removed

func (*ISCSIUtil) ReScan

func (util *ISCSIUtil) ReScan(iqn, targetPortal string) error

ReScan rescans all the iSCSI sessions on the host

func (*ISCSIUtil) ResizeExt4

func (util *ISCSIUtil) ResizeExt4(path string) error

ResizeExt4 can be used to run a resize command on the ext4 filesystem to expand the filesystem to the actual size of the device

func (*ISCSIUtil) ResizeXFS

func (util *ISCSIUtil) ResizeXFS(path string) error

ResizeXFS can be used to run a resize command on the xfs filesystem to expand the filesystem to the actual size of the device

func (*ISCSIUtil) UnmountDisk

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

UnmountDisk logs out of the iSCSI volume and the corresponding path is removed

type StatFunc

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

StatFunc stats 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