Browse Source

Add extra size to avoid round-up problems

Alessandro De Gennaro 4 years ago
parent
commit
2021c90c97
1 changed files with 3 additions and 1 deletions
  1. 3 1
      parse-arguments.sh

+ 3 - 1
parse-arguments.sh

@@ -51,7 +51,9 @@ default()
 	fi
 	VM_SIZE=$(to_sectors 100G)
 	SWAP_SIZE=$(( $RAM_SIZE + $(to_sectors 1G) ))
-	FREE_SIZE=$(( $DEVICE_SIZE - $VM_SIZE - $SWAP_SIZE ))
+	## Add 5 extra sectors for round-up
+	EXTRA_SIZE=5
+	FREE_SIZE=$(( $DEVICE_SIZE - $VM_SIZE - $SWAP_SIZE - $EXTRA_SIZE ))
 	## Condor partition is 40% of remaining space
 	CONDOR_SIZE=$(( $FREE_SIZE  * 4 / 10 ))
 	## Scratch partition is 60% of remaining space