mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-11-02 16:04:52 +08:00
fix: Round down minimum disk size (#1065)
This commit is contained in:
parent
c2fa58ef27
commit
48e7a9fff0
@ -437,7 +437,7 @@ addDisk () {
|
|||||||
local SPARE=536870912
|
local SPARE=536870912
|
||||||
SPACE=$(df --output=avail -B 1 "$DIR" | tail -n 1)
|
SPACE=$(df --output=avail -B 1 "$DIR" | tail -n 1)
|
||||||
(( SPACE < SPARE )) && SPACE="$SPARE" || SPACE=$((SPACE-SPARE))
|
(( SPACE < SPARE )) && SPACE="$SPARE" || SPACE=$((SPACE-SPARE))
|
||||||
GB=$(( SPACE/1073741824 ))
|
GB=$(( SPACE/1073741825 ))
|
||||||
DISK_SPACE="${GB}G"
|
DISK_SPACE="${GB}G"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user