block_device_utils

package
v1.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	NotMountedErrorMessage                   = "not mounted" // Error while umount device that is already unmounted
	TimeoutMilisecondMountCmdIsDeviceMounted = 20 * 1000     // max to wait for mount command
	TimeoutMilisecondMountCmdMountFs         = 120 * 1000    // max to wait for mounting device
	TimeoutMilisecondUmountCmdUmountFs       = 30 * 1000     // max wait timeout for umount command
)
View Source
const CleanupTimeout = 30 * 1000
View Source
const DiscoverTimeout = 20 * 1000
View Source
const MultipathTimeout = 60 * 1000

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockDeviceUtils

type BlockDeviceUtils interface {
	Rescan(protocol Protocol) error
	ReloadMultipath() error
	Discover(volumeWwn string, deepDiscovery bool) (string, error)
	GetWwnByScsiInq(dev string) (string, error)
	DiscoverBySgInq(mpathOutput string, volumeWwn string) (string, error)
	Cleanup(mpath string) error
	CheckFs(mpath string) (bool, error)
	MakeFs(mpath string, fsType string) error
	MountFs(mpath string, mpoint string) error
	UmountFs(mpoint string, volumeWwn string) error
	IsDeviceMounted(devPath string) (bool, []string, error)
	IsDirAMountPoint(dirPath string) (bool, []string, error)
}

func NewBlockDeviceUtils

func NewBlockDeviceUtils() BlockDeviceUtils

func NewBlockDeviceUtilsWithExecutor

func NewBlockDeviceUtilsWithExecutor(executor utils.Executor) BlockDeviceUtils

type CommandExecuteError added in v1.2.0

type CommandExecuteError struct {
	Cmd string
	Err error
}

func (*CommandExecuteError) Error added in v1.2.0

func (e *CommandExecuteError) Error() string

type Protocol

type Protocol int
const (
	SCSI Protocol = iota
	ISCSI
)

type VolumeNotFoundError added in v1.2.0

type VolumeNotFoundError struct {
	VolName string
}

func (*VolumeNotFoundError) Error added in v1.2.0

func (e *VolumeNotFoundError) Error() string

Jump to

Keyboard shortcuts

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