mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-21 07:17:25 +08:00
do not add new volumes when below minFreeSpacePercent
fix https://github.com/chrislusf/seaweedfs/issues/2017
This commit is contained in:
@@ -106,6 +106,9 @@ func (s *Store) FindFreeLocation(diskType DiskType) (ret *DiskLocation) {
|
|||||||
if diskType != location.DiskType {
|
if diskType != location.DiskType {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if location.isDiskSpaceLow {
|
||||||
|
continue
|
||||||
|
}
|
||||||
currentFreeCount := location.MaxVolumeCount - location.VolumesLen()
|
currentFreeCount := location.MaxVolumeCount - location.VolumesLen()
|
||||||
currentFreeCount *= erasure_coding.DataShardsCount
|
currentFreeCount *= erasure_coding.DataShardsCount
|
||||||
currentFreeCount -= location.EcVolumesLen()
|
currentFreeCount -= location.EcVolumesLen()
|
||||||
|
Reference in New Issue
Block a user