fix error reporting for "Need to a hdd disk type"

related to https://github.com/chrislusf/seaweedfs/issues/3128
This commit is contained in:
chrislu 2022-05-31 12:43:55 -07:00
parent 8a49240d64
commit 89948a373b

View file

@ -50,7 +50,7 @@ func (c *commandClusterCheck) Do(args []string, commandEnv *CommandEnv, writer i
if !emptyDiskTypeFound && !hddDiskTypeFound {
return fmt.Errorf("Need to a hdd disk type!")
}
if emptyDiskTypeFound && emptyDiskTypeDiskInfo.VolumeCount == 0 || hddDiskTypeFound && hddDiskTypeDiskInfo.VolumeCount == 0 {
if emptyDiskTypeFound && emptyDiskTypeDiskInfo.MaxVolumeCount == 0 || hddDiskTypeFound && hddDiskTypeDiskInfo.MaxVolumeCount == 0 {
return fmt.Errorf("Need to a hdd disk type!")
}