aboutsummaryrefslogtreecommitdiff
path: root/weed/command/volume.go
diff options
context:
space:
mode:
authorhilimd <68371223+hilimd@users.noreply.github.com>2020-10-10 13:07:57 +0800
committerGitHub <noreply@github.com>2020-10-10 13:07:57 +0800
commit411e49f96494629fa3da334e8dc7cc15bd4d19cd (patch)
tree1756f0a2f86c871a6db67df7ecbd509c9df32233 /weed/command/volume.go
parentac162fc85769cb1b2a1f8694f9644eae7d0ce6c8 (diff)
parent4a15e9c830de1b654515308e5be8380ffa34aefa (diff)
downloadseaweedfs-411e49f96494629fa3da334e8dc7cc15bd4d19cd.tar.xz
seaweedfs-411e49f96494629fa3da334e8dc7cc15bd4d19cd.zip
Merge pull request #23 from chrislusf/master
sync
Diffstat (limited to 'weed/command/volume.go')
-rw-r--r--weed/command/volume.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/weed/command/volume.go b/weed/command/volume.go
index dfc649ba5..d73c24ed1 100644
--- a/weed/command/volume.go
+++ b/weed/command/volume.go
@@ -138,6 +138,11 @@ func (v VolumeServerOptions) startVolumeServer(volumeFolders, maxVolumeCounts, v
glog.Fatalf("The max specified in -max not a valid number %s", maxString)
}
}
+ if len(v.folderMaxLimits) == 1 && len(v.folders) > 1 {
+ for i := 0; i < len(v.folders)-1; i++ {
+ v.folderMaxLimits = append(v.folderMaxLimits, v.folderMaxLimits[0])
+ }
+ }
if len(v.folders) != len(v.folderMaxLimits) {
glog.Fatalf("%d directories by -dir, but only %d max is set by -max", len(v.folders), len(v.folderMaxLimits))
}