mirror of
https://github.com/minio/minio.git
synced 2025-11-20 01:50:24 -05:00
Fix writing 'format.json' and make it atomic (#8296)
- Choose a unique uuid such that under situations of duplicate mounts we do not append to an existing json entry. - Avoid AppendFile instead use WriteAll() to write the entire byte array atomically.
This commit is contained in:
@@ -1492,7 +1492,7 @@ func (s *xlSets) HealFormat(ctx context.Context, dryRun bool) (res madmin.HealRe
|
||||
}
|
||||
}
|
||||
|
||||
if !hasAnyErrorsUnformatted(sErrs) {
|
||||
if countErrs(sErrs, errUnformattedDisk) == 0 {
|
||||
// No unformatted disks found disks are either offline
|
||||
// or online, no healing is required.
|
||||
return res, errNoHealRequired
|
||||
|
||||
Reference in New Issue
Block a user