|
|
|
@ -129,6 +129,12 @@ func connectLoadInitFormats(firstDisk bool, endpoints EndpointList, setCount, dr |
|
|
|
|
|
|
|
|
|
// Attempt to load all `format.json` from all disks.
|
|
|
|
|
formatConfigs, sErrs := loadFormatXLAll(storageDisks) |
|
|
|
|
// Check if we have
|
|
|
|
|
for i, sErr := range sErrs { |
|
|
|
|
if _, ok := formatCriticalErrors[sErr]; ok { |
|
|
|
|
return nil, fmt.Errorf("Disk %s: %s", endpoints[i], sErr) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Pre-emptively check if one of the formatted disks
|
|
|
|
|
// is invalid. This function returns success for the
|
|
|
|
@ -139,12 +145,6 @@ func connectLoadInitFormats(firstDisk bool, endpoints EndpointList, setCount, dr |
|
|
|
|
return nil, err |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for i, sErr := range sErrs { |
|
|
|
|
if _, ok := formatCriticalErrors[sErr]; ok { |
|
|
|
|
return nil, fmt.Errorf("Disk %s: %s", endpoints[i], sErr) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// All disks report unformatted we should initialized everyone.
|
|
|
|
|
if shouldInitXLDisks(sErrs) && firstDisk { |
|
|
|
|
return initFormatXL(context.Background(), storageDisks, setCount, drivesPerSet) |
|
|
|
|