diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-04-21 23:11:09 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-04-21 23:11:11 -0700 |
| commit | ca998328c2916fdba751fa9add6f8eec626ff0be (patch) | |
| tree | 264b4fb3ab881208b0770249d13d1fa6e2b9a38a /weed | |
| parent | 7deb4b20cd08662085f5f2ac92a26a541501b847 (diff) | |
| download | seaweedfs-ca998328c2916fdba751fa9add6f8eec626ff0be.tar.xz seaweedfs-ca998328c2916fdba751fa9add6f8eec626ff0be.zip | |
do not add new volumes when below minFreeSpacePercent
fix https://github.com/chrislusf/seaweedfs/issues/2017
Diffstat (limited to 'weed')
| -rw-r--r-- | weed/storage/store.go | 3 |
1 files changed, 3 insertions, 0 deletions
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() |
