mirror of
https://github.com/minio/minio.git
synced 2025-11-29 21:33:31 -05:00
erasure: Handle failed disks so that we initialize properly if they are missing. (#1607)
Fixes #1592 Fixes #1579
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user