Documentation ¶
Index ¶
- func ActualControllerNumber(_ context.Context, passedController uint8) (uint8, error)
- func ControllerLunToName(ctx context.Context, controller, lun uint8) (_ string, err error)
- func Mount(ctx context.Context, controller, lun uint8, target string, readonly bool, ...) (err error)
- func Unmount(ctx context.Context, controller, lun uint8, target string, encrypted bool, ...) (err error)
- func UnplugDevice(ctx context.Context, controller, lun uint8) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActualControllerNumber ¶ added in v0.10.0
ActualControllerNumber retrieves the actual controller number assigned to a SCSI controller with number `passedController`. When HCS creates the UVM it adds 4 SCSI controllers to the UVM but the 1st SCSI controller according to HCS can actually show up as 2nd, 3rd or 4th controller inside the UVM. So the i'th controller from HCS' perspective could actually be j'th controller inside the UVM. However, we can refer to the SCSI controllers with their GUIDs (that are hardcoded) and then using that GUID find out the SCSI controller number inside the guest. This function does exactly that.
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 *guestresource.DeviceVerityInfo) (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 *guestresource.DeviceVerityInfo, ) (err error)
Unmount SCSI device mounted at `target`. Cleanup associated dm-verity and dm-crypt devices when necessary.
Types ¶
This section is empty.