mirror of
https://github.com/minio/minio.git
synced 2025-11-09 13:39:46 -05:00
Move formatting of disks out of object layer initialization (#2572)
This commit is contained in:
committed by
Harshavardhana
parent
5c4dbc966f
commit
de67bca211
10
cmd/xl-v1.go
10
cmd/xl-v1.go
@@ -78,22 +78,12 @@ func repairDiskMetadata(storageDisks []StorageAPI) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// Initialize meta volume, if volume already exists ignores it.
|
||||
if err := initMetaVolume(storageDisks); err != nil {
|
||||
return fmt.Errorf("Unable to initialize '.minio.sys' meta volume, %s", err)
|
||||
}
|
||||
|
||||
// Handles different cases properly.
|
||||
switch reduceFormatErrs(sErrs, len(storageDisks)) {
|
||||
case errCorruptedFormat:
|
||||
if err := healFormatXLCorruptedDisks(storageDisks); err != nil {
|
||||
return fmt.Errorf("Unable to repair corrupted format, %s", err)
|
||||
}
|
||||
case errUnformattedDisk:
|
||||
// All drives online but fresh, initialize format.
|
||||
if err := initFormatXL(storageDisks); err != nil {
|
||||
return fmt.Errorf("Unable to initialize format, %s", err)
|
||||
}
|
||||
case errSomeDiskUnformatted:
|
||||
// All drives online but some report missing format.json.
|
||||
if err := healFormatXLFreshDisks(storageDisks); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user