mirror of
https://github.com/minio/minio.git
synced 2025-11-10 22:10:12 -05:00
Implement mgmt REST APIs to heal storage format. (#3604)
* Implement heal format REST API handler * Implement admin peer rpc handler to re-initialize storage * Implement HealFormat API in pkg/madmin * Update pkg/madmin API.md to incl. HealFormat * Added unit tests for ReInitDisks rpc handler and HealFormatHandler
This commit is contained in:
committed by
Harshavardhana
parent
4e926b292f
commit
586058f079
@@ -38,8 +38,11 @@ func main() {
|
||||
|
||||
| Service operations|LockInfo operations|Healing operations|
|
||||
|:---|:---|:---|
|
||||
|[`ServiceStatus`](#ServiceStatus)| | |
|
||||
|[`ServiceRestart`](#ServiceRestart)| | |
|
||||
|[`ServiceStatus`](#ServiceStatus)| [`ListLocks`](#ListLocks)| [`ListObjectsHeal`](#ListObjectsHeal)|
|
||||
|[`ServiceRestart`](#ServiceRestart)| [`ClearLocks`](#ClearLocks)| [`ListBucketsHeal`](#ListBucketsHeal)|
|
||||
| | |[`HealBucket`](#HealBucket) |
|
||||
| | |[`HealObject`](#HealObject)|
|
||||
| | |[`HealFormat`](#HealFormat)|
|
||||
|
||||
## 1. Constructor
|
||||
<a name="Minio"></a>
|
||||
@@ -185,14 +188,14 @@ __Example__
|
||||
}
|
||||
```
|
||||
|
||||
<a name="ListBucketsList"></a>
|
||||
### ListBucketsList() error
|
||||
<a name="ListBucketsHeal"></a>
|
||||
### ListBucketsHeal() error
|
||||
If successful returns information on the list of buckets that need healing.
|
||||
|
||||
__Example__
|
||||
|
||||
``` go
|
||||
// List buckets that need healing
|
||||
// List buckets that need healing
|
||||
healBucketsList, err := madmClnt.ListBucketsHeal()
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
@@ -244,3 +247,19 @@ __Example__
|
||||
log.Println("successfully healed mybucket/myobject")
|
||||
|
||||
```
|
||||
|
||||
<a name="HealFormat"></a>
|
||||
### HealFormat() error
|
||||
Heal storage format on available disks. This is used when disks were replaced or were found with missing format. This is supported only for erasure-coded backend.
|
||||
|
||||
__Example__
|
||||
|
||||
``` go
|
||||
err := madmClnt.HealFormat()
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
||||
log.Println("successfully healed storage format on available disks.")
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user