mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #11235 from zhaoxiangchun/automated-cherry-pick-of-#11233-upstream-release-3.7
Automated cherry pick of #11233: fix(host): raid status fix
This commit is contained in:
@@ -111,14 +111,10 @@ func (dev *MegaRaidPhyDev) parseLine(line string) bool {
|
||||
case "Inquiry Data":
|
||||
dev.Model = strings.Join(regexp.MustCompile(`\s+`).Split(val, -1), " ")
|
||||
case "Firmware state":
|
||||
if val == "JBOD" {
|
||||
dev.Status = "jbod"
|
||||
} else if strings.Contains(strings.ToLower(val), "online") {
|
||||
dev.Status = "online"
|
||||
} else if val == "Rebuild" {
|
||||
dev.Status = "rebuild"
|
||||
} else {
|
||||
if strings.Contains(strings.ToLower(val), "offline") {
|
||||
dev.Status = "offline"
|
||||
} else {
|
||||
dev.Status = "online"
|
||||
}
|
||||
case "Logical Sector Size":
|
||||
block, err := strconv.Atoi(val)
|
||||
|
||||
Reference in New Issue
Block a user