mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
xl: Avoid multi-disks node to exit when one disk fails (#12423)
It makes sense that a node that has multiple disks starts when one disk fails, returning an i/o error for example. This commit will make this faulty tolerance available in this specific use case.
This commit is contained in:
@@ -257,18 +257,17 @@ func (l EndpointServerPools) Localhost() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
// FirstLocalDiskPath returns the disk path of first (in cmdline args order)
|
||||
// local endpoint.
|
||||
func (l EndpointServerPools) FirstLocalDiskPath() string {
|
||||
var diskPath string
|
||||
// LocalDisksPaths returns the disk paths of the local disks
|
||||
func (l EndpointServerPools) LocalDisksPaths() []string {
|
||||
var disks []string
|
||||
for _, ep := range l {
|
||||
for _, endpoint := range ep.Endpoints {
|
||||
if endpoint.IsLocal {
|
||||
return endpoint.Path
|
||||
disks = append(disks, endpoint.Path)
|
||||
}
|
||||
}
|
||||
}
|
||||
return diskPath
|
||||
return disks
|
||||
}
|
||||
|
||||
// FirstLocal returns true if the first endpoint is local.
|
||||
|
||||
Reference in New Issue
Block a user