Browse Source

do not add new volumes when below minFreeSpacePercent

fix https://github.com/chrislusf/seaweedfs/issues/2017
pull/2030/head
Chris Lu 4 years ago
parent
commit
ca998328c2
  1. 3
      weed/storage/store.go

3
weed/storage/store.go

@ -106,6 +106,9 @@ func (s *Store) FindFreeLocation(diskType DiskType) (ret *DiskLocation) {
if diskType != location.DiskType {
continue
}
if location.isDiskSpaceLow {
continue
}
currentFreeCount := location.MaxVolumeCount - location.VolumesLen()
currentFreeCount *= erasure_coding.DataShardsCount
currentFreeCount -= location.EcVolumesLen()

Loading…
Cancel
Save