iscsidev

package
v0.0.0-...-7e19304 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LockFile    = "/var/run/longhorn-iscsi.lock"
	LockTimeout = 120 * time.Second

	TargetLunID = 1

	RetryCounts           = 5
	RetryIntervalSCSI     = 3 * time.Second
	RetryIntervalTargetID = 500 * time.Millisecond
)

Functions

func GetTargetName

func GetTargetName(volumeName string) string

func LogoutTarget

func LogoutTarget(target string, nsexec *lhns.Executor) error

func Volume2ISCSIName

func Volume2ISCSIName(name string) string

Types

type Device

type Device struct {
	Target       string
	KernelDevice *lhtypes.BlockDeviceInfo

	ScsiDeviceParameters
	IscsiDeviceParameters

	BackingFile string
	BSType      string
	BSOpts      string
	// contains filtered or unexported fields
}

func NewDevice

func NewDevice(name, backingFile, bsType, bsOpts string, scsiTimeout, iscsiAbortTimeout int64) (*Device, error)

func (*Device) CreateTarget

func (dev *Device) CreateTarget() (err error)

func (*Device) DeleteTarget

func (dev *Device) DeleteTarget() error

func (*Device) ExpandTarget

func (dev *Device) ExpandTarget(size int64) error

func (*Device) RefreshInitiator

func (dev *Device) RefreshInitiator() error

func (*Device) ReloadInitiator

func (dev *Device) ReloadInitiator() error

ReloadInitiator does nothing for the iSCSI initiator/target except for updating the timeout. It is mainly responsible for initializing the struct field `dev.KernelDevice`.

func (*Device) ReloadTargetID

func (dev *Device) ReloadTargetID() error

func (*Device) StartInitator

func (dev *Device) StartInitator() error

func (*Device) StopInitiator

func (dev *Device) StopInitiator() error

func (*Device) UpdateScsiBackingStore

func (dev *Device) UpdateScsiBackingStore(bsType, bsOpts string) error

type IscsiDeviceParameters

type IscsiDeviceParameters struct {
	IscsiAbortTimeout int64
}

type ScsiDeviceParameters

type ScsiDeviceParameters struct {
	ScsiTimeout int64
}

Jump to

Keyboard shortcuts

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