mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
fix: New disks healing should pick unformatted disks as well (#13054)
A recent regression caused new disks not being re-formatted. In the old code, a disk needed be 'online' to be chosen to be formatted but the disk has to be already formatted for XL storage IsOnline() function to return true. It is enough to check if XL storage is nil or not if we want to avoid formatting root disks. Co-authored-by: Anis Elleuch <anis@min.io>
This commit is contained in:
parent
6a8d0fb955
commit
f1cab828ee
1
.github/workflows/go.yml
vendored
1
.github/workflows/go.yml
vendored
@ -32,3 +32,4 @@ jobs:
|
||||
sudo sysctl net.ipv6.conf.all.disable_ipv6=0
|
||||
sudo sysctl net.ipv6.conf.default.disable_ipv6=0
|
||||
make verify
|
||||
make verify-healing
|
||||
|
@ -705,7 +705,7 @@ func saveUnformattedFormat(ctx context.Context, storageDisks []StorageAPI, forma
|
||||
if format == nil {
|
||||
continue
|
||||
}
|
||||
if storageDisks[index] != nil && storageDisks[index].IsOnline() {
|
||||
if storageDisks[index] != nil {
|
||||
if err := saveFormatErasure(storageDisks[index], format, true); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user