diff options
| author | a <eddy@gfxlabs.io> | 2022-04-12 14:42:29 -0700 |
|---|---|---|
| committer | a <eddy@gfxlabs.io> | 2022-04-12 14:42:29 -0700 |
| commit | 846858fb436cc061c40c4f2565ed3682e3758596 (patch) | |
| tree | 28984dd19b8cdb4ddb41a4a4283cb4b6644b37a4 /weed/shell/command_cluster_check.go | |
| parent | 41d396edc4a8cdd586e9e58cab7b725c070ca685 (diff) | |
| parent | 42fea7e7d6ce0aca8474c9beba27d33f15bd4f49 (diff) | |
| download | seaweedfs-846858fb436cc061c40c4f2565ed3682e3758596.tar.xz seaweedfs-846858fb436cc061c40c4f2565ed3682e3758596.zip | |
merge master
Diffstat (limited to 'weed/shell/command_cluster_check.go')
| -rw-r--r-- | weed/shell/command_cluster_check.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/weed/shell/command_cluster_check.go b/weed/shell/command_cluster_check.go index f841bd224..c8fe110ba 100644 --- a/weed/shell/command_cluster_check.go +++ b/weed/shell/command_cluster_check.go @@ -48,7 +48,10 @@ func (c *commandClusterCheck) Do(args []string, commandEnv *CommandEnv, writer i emptyDiskTypeDiskInfo, emptyDiskTypeFound := topologyInfo.DiskInfos[""] hddDiskTypeDiskInfo, hddDiskTypeFound := topologyInfo.DiskInfos["hdd"] - if !emptyDiskTypeFound && !hddDiskTypeFound || emptyDiskTypeDiskInfo.VolumeCount == 0 && hddDiskTypeDiskInfo.VolumeCount == 0 { + if !emptyDiskTypeFound && !hddDiskTypeFound { + return fmt.Errorf("Need to a hdd disk type!") + } + if emptyDiskTypeFound && emptyDiskTypeDiskInfo.VolumeCount == 0 || hddDiskTypeFound && hddDiskTypeDiskInfo.VolumeCount == 0 { return fmt.Errorf("Need to a hdd disk type!") } |
