storage/xl: Return errVolumeAccessDenied if disks cannot be accessed. (#1621)

Fixes #1614
This commit is contained in:
Harshavardhana
2016-05-12 21:01:11 -07:00
parent d6e0f3ab33
commit b62774d32f
4 changed files with 58 additions and 43 deletions

View File

@@ -93,12 +93,14 @@ func newXLObjects(exportPaths ...string) (ObjectLayer, error) {
} else {
log.Errorf("Unable to check backend format %s", err)
if err == errReadQuorum {
errMsg := fmt.Sprintf("Not all disks %s on command line are available to meet the read quroum.", exportPaths)
return nil, errors.New(errMsg)
}
if err == errDiskNotFound {
errMsg := fmt.Sprintf("All disks %s on command line are not available.", exportPaths)
return nil, errors.New(errMsg)
errMsg := fmt.Sprintf("Not all disks %s are available, did not meet read quroum.", exportPaths)
err = errors.New(errMsg)
} else if err == errDiskNotFound {
errMsg := fmt.Sprintf("Disks %s not found.", exportPaths)
err = errors.New(errMsg)
} else if err == errVolumeAccessDenied {
errMsg := fmt.Sprintf("Disks %s access permission denied.", exportPaths)
err = errors.New(errMsg)
}
return nil, err
}