in gce-containers-startup/volumes/volumes.go [428:440]
func (env Env) mountDevice(mnt mount) error {
log.Printf("Attempting to mount device %s at %s.", mnt.device, mnt.mountPoint)
mountCommandline := []string{"mount"}
if len(mnt.options) > 0 {
mountCommandline = append(mountCommandline, "-o", mnt.options)
}
mountCommandline = append(mountCommandline, "-t", mnt.fsType, mnt.device, mnt.mountPoint)
_, err := env.OsCommandRunner.Run(wrapToEnterHostMountNamespace(mountCommandline...)...)
if err != nil {
return fmt.Errorf("Failed to mount %s at %s: %v", mnt.device, mnt.mountPoint, err)
}
return nil
}