erasure: Handle failed disks so that we initialize properly if they are missing. (#1607)

Fixes #1592
Fixes #1579
This commit is contained in:
Harshavardhana
2016-05-11 18:58:32 -07:00
parent d4745c7d6a
commit 50431e91a6
6 changed files with 52 additions and 20 deletions

View File

@@ -18,6 +18,7 @@ package main
import (
"encoding/json"
"errors"
"fmt"
"io"
"path/filepath"
@@ -91,6 +92,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)
}
return nil, err
}
}