multipath

package
v1.99.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Multipath

type Multipath struct {
	// contains filtered or unexported fields
}

Multipath defines implementation of LimitedOSExec and LimitedFile path interfaces

func NewMultipath

func NewMultipath(chroot string) *Multipath

NewMultipath initializes multipath struct

func (*Multipath) AddPath

func (mp *Multipath) AddPath(ctx context.Context, path string) error

AddPath add a path to multipathd for monitoring.

This has the effect of multipathd checking an already checked device
for multipath.
Together with `multipath_add_wwid` we can create a multipath when
there's only 1 path.

func (*Multipath) AddWWID

func (mp *Multipath) AddWWID(ctx context.Context, wwid string) error

AddWWID add wwid to the list of know multipath wwids.

This has the effect of multipathd being willing to create a dm for a
multipath even when there's only 1 device.

func (*Multipath) DelPath

func (mp *Multipath) DelPath(ctx context.Context, path string) error

DelPath remove a path from multipathd mapping

func (*Multipath) FlushDevice

func (mp *Multipath) FlushDevice(ctx context.Context, deviceMapName string) error

FlushDevice flush multipath device. To prevent stucking always use context.WithTimeout

func (*Multipath) GetDMWWID

func (mp *Multipath) GetDMWWID(ctx context.Context, deviceMapName string) (string, error)

GetDMWWID read DeviceMapper WWID from multipathd

func (*Multipath) IsDaemonRunning

func (mp *Multipath) IsDaemonRunning(ctx context.Context) bool

IsDaemonRunning check if multipath daemon running

Jump to

Keyboard shortcuts

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