info: Always refresh the root disk status (#20023)

Add root drive status in the disk info cache function, so unmounting a
drive without restarting a local node reflects the correct value.
This commit is contained in:
Anis Eleuch
2024-07-02 21:41:29 +01:00
committed by GitHub
parent 2040559f71
commit 2ec1f404ac
7 changed files with 40 additions and 54 deletions

View File

@@ -102,6 +102,8 @@ func diskErrToDriveState(err error) (state string) {
state = madmin.DriveStatePermission
case errors.Is(err, errFaultyDisk):
state = madmin.DriveStateFaulty
case errors.Is(err, errDriveIsRoot):
state = madmin.DriveStateRootMount
case err == nil:
state = madmin.DriveStateOk
default: