package scsi

import "github.com/Microsoft/opengcs/internal/storage/scsi"

Index

Functions

func ControllerLunToName

func ControllerLunToName(ctx context.Context, controller, lun uint8) (_ string, err error)

ControllerLunToName finds the `/dev/sd*` path to the SCSI device on `controller` index `lun`.

func Mount

func Mount(ctx context.Context, controller, lun uint8, target string, readonly bool) (err error)

Mount creates a mount from the SCSI device on `controller` index `lun` to `target`

`target` will be created. On mount failure the created `target` will be automatically cleaned up.

func UnplugDevice

func UnplugDevice(ctx context.Context, controller, lun uint8) (err error)

UnplugDevice finds the SCSI device on `controller` index `lun` and issues a guest initiated unplug.

If the device is not attached returns no error.

Source Files

scsi.go

Version
v0.4.0 (latest)
Published
Dec 4, 2020
Platform
linux/amd64
Imports
11 packages
Last checked
12 hours ago

Tools for package owners.