|
|
@ -128,6 +128,15 @@ func connectLoadInitFormats(retryCount int, firstDisk bool, endpoints EndpointLi |
|
|
|
} |
|
|
|
} |
|
|
|
defer closeStorageDisks(storageDisks) |
|
|
|
defer closeStorageDisks(storageDisks) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 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) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Connect to all storage disks, a connection failure will be
|
|
|
|
// Connect to all storage disks, a connection failure will be
|
|
|
|
// only logged after some retries.
|
|
|
|
// only logged after some retries.
|
|
|
|
for _, disk := range storageDisks { |
|
|
|
for _, disk := range storageDisks { |
|
|
@ -139,15 +148,6 @@ func connectLoadInitFormats(retryCount int, firstDisk bool, endpoints EndpointLi |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 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
|
|
|
|
// Pre-emptively check if one of the formatted disks
|
|
|
|
// is invalid. This function returns success for the
|
|
|
|
// is invalid. This function returns success for the
|
|
|
|
// most part unless one of the formats is not consistent
|
|
|
|
// most part unless one of the formats is not consistent
|
|
|
|