From ca998328c2916fdba751fa9add6f8eec626ff0be Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Wed, 21 Apr 2021 23:11:09 -0700 Subject: [PATCH] do not add new volumes when below minFreeSpacePercent fix https://github.com/chrislusf/seaweedfs/issues/2017 --- weed/storage/store.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/weed/storage/store.go b/weed/storage/store.go index c3507c0e2..6be15a4c9 100644 --- a/weed/storage/store.go +++ b/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()