package scsi
import "github.com/Microsoft/hcsshim/internal/guest/storage/scsi"
Index ¶
- func ControllerLunToName(ctx context.Context, controller, lun uint8) (_ string, err error)
- func Mount(ctx context.Context, controller, lun uint8, target string, readonly bool, encrypted bool, options []string, verityInfo *prot.DeviceVerityInfo, securityPolicy securitypolicy.SecurityPolicyEnforcer) (err error)
- func Unmount(ctx context.Context, controller, lun uint8, target string, encrypted bool, verityInfo *prot.DeviceVerityInfo, securityPolicy securitypolicy.SecurityPolicyEnforcer) (err error)
- func UnplugDevice(ctx context.Context, controller, lun uint8) (err error)
Functions ¶
func ControllerLunToName ¶
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, encrypted bool, options []string, verityInfo *prot.DeviceVerityInfo, securityPolicy securitypolicy.SecurityPolicyEnforcer) (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.
If `encrypted` is set to true, the SCSI device will be encrypted using dm-crypt.
func Unmount ¶
func Unmount(ctx context.Context, controller, lun uint8, target string, encrypted bool, verityInfo *prot.DeviceVerityInfo, securityPolicy securitypolicy.SecurityPolicyEnforcer) (err error)
Unmount unmounts a SCSI device mounted at `target`.
If `encrypted` is true, it removes all its associated dm-crypto state.
func UnplugDevice ¶
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 ¶
- Version
- v0.9.10
- Published
- Jul 20, 2023
- Platform
- linux/amd64
- Imports
- 15 packages
- Last checked
- 16 minutes ago –
Tools for package owners.