Browse Source

volume: add default minFreeSpacePercent

fix https://github.com/chrislusf/seaweedfs/issues/1366
pull/1371/head
Chris Lu 5 years ago
parent
commit
98493e0152
  1. 5
      weed/command/volume.go

5
weed/command/volume.go

@ -142,6 +142,11 @@ func (v VolumeServerOptions) startVolumeServer(volumeFolders, maxVolumeCounts, v
glog.Fatalf("The value specified in -minFreeSpacePercent not a valid value %s", freeString)
}
}
if len(v.minFreeSpacePercent) == 1 && len(v.folders) > 1 {
for i := 0; i < len(v.folders)-1; i++ {
v.minFreeSpacePercent = append(v.minFreeSpacePercent, v.minFreeSpacePercent[0])
}
}
if len(v.folders) != len(v.minFreeSpacePercent) {
glog.Fatalf("%d directories by -dir, but only %d minFreeSpacePercent is set by -minFreeSpacePercent", len(v.folders), len(v.minFreeSpacePercent))
}

Loading…
Cancel
Save