Update Calculation to include the used space for the allocation (#1899)

This commit is contained in:
Stefan Benten 2019-05-06 20:59:30 +02:00 committed by aligeti
parent 9f98450824
commit eeb4f6541e

View File

@ -103,7 +103,7 @@ func (service *Service) Run(ctx context.Context) (err error) {
// the available disk space is less than remaining allocated space,
// due to change of setting before restarting
if freeDiskSpace < service.allocatedDiskSpace-totalUsed {
service.allocatedDiskSpace = freeDiskSpace
service.allocatedDiskSpace = freeDiskSpace + totalUsed
service.log.Warn("Disk space is less than requested. Allocating space", zap.Int64("bytes", service.allocatedDiskSpace))
}