Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

Commit

Permalink
scsi: Allow SCSI drives to be passed for volumes
Browse files Browse the repository at this point in the history
Similar to rootfs, add support for SCSI disk to be passed
for a volume mount.

Fixes #209

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
  • Loading branch information
amshinde committed Feb 22, 2018
1 parent d2c7690 commit be3f50e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -1306,6 +1306,15 @@ func addMounts(config *configs.Config, fsmaps []hyper.Fsmap) error {
for _, fsmap := range fsmaps {

source := fsmap.Source
var err error

if fsmap.SCSIAddr != "" {
source, err = getSCSIDisk(fsmap.SCSIAddr)
if err != nil {
return err
}
}

if !fsmap.AbsolutePath {
source = filepath.Join(mountShareDirDest, fsmap.Source)
}
Expand Down
5 changes: 5 additions & 0 deletions api/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ type Fsmap struct {
AbsolutePath bool `json:"absolutePath"`
ReadOnly bool `json:"readOnly"`
DockerVolume bool `json:"dockerVolume"`

// SCSIAddr is the SCSI address in the format SCSI-id:LUN.
// If SCSIAddr is provided, we use that to determine the device name to be mounted
// ignoring the Source field that is used for as the source location for mounting otherwise.
SCSIAddr string `json:"scsiAddr,omitempty"`
}

// Capabilities specify the capabilities to keep when executing the process inside the container.
Expand Down

0 comments on commit be3f50e

Please sign in to comment.