mirror of
https://github.com/minio/minio.git
synced 2025-11-29 21:33:31 -05:00
Ignore faulty disks in xl-sets Storage info (#7878)
This commit is contained in:
committed by
kannappanr
parent
2c3b1f01d9
commit
b976521c83
@@ -698,6 +698,22 @@ func initStorageDisks(endpoints EndpointList) ([]StorageAPI, error) {
|
||||
return storageDisks, nil
|
||||
}
|
||||
|
||||
// Runs through the faulty disks and record their errors.
|
||||
func initDisksWithErrors(endpoints EndpointList) ([]StorageAPI, []error) {
|
||||
storageDisks := make([]StorageAPI, len(endpoints))
|
||||
var dErrs = make([]error, len(storageDisks))
|
||||
for index, endpoint := range endpoints {
|
||||
storage, err := newStorageAPI(endpoint)
|
||||
if err != nil {
|
||||
logger.LogIf(context.Background(), err)
|
||||
dErrs[index] = err
|
||||
continue
|
||||
}
|
||||
storageDisks[index] = storage
|
||||
}
|
||||
return storageDisks, dErrs
|
||||
}
|
||||
|
||||
// formatXLV3ThisEmpty - find out if '.This' field is empty
|
||||
// in any of the input `formats`, if yes return true.
|
||||
func formatXLV3ThisEmpty(formats []*formatXLV3) bool {
|
||||
|
||||
Reference in New Issue
Block a user