Revert "Fix root volume size comparison"
This reverts commit 8000e76d43
, because
as @marmarek pointed out, the original was correct and I totally
misread. The check in question is checking whether to _abort_, not
whether to continue. So we want to check if the block device size is
_less_ than the filesystem + margin, not more.
Reopens QubesOS/qubes-issues#4553
This commit is contained in:
parent
737a65e5e7
commit
c05310f61c
@ -16,7 +16,7 @@ sysfs_xvda="/sys/class/block/xvda"
|
||||
# if root filesystem use already (almost) the whole dis
|
||||
size_margin=$(( 250 * 1024 * 2 ))
|
||||
rootfs_size=$(df --block-size=512 --output=size / | tail -n 1 | tr -d ' ')
|
||||
if [ $(cat $sysfs_xvda/size) -gt \
|
||||
if [ $(cat $sysfs_xvda/size) -lt \
|
||||
$(( size_margin + rootfs_size )) ]; then
|
||||
echo "root filesystem already at $rootfs_size blocks" >&2
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user