mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-02-24 21:40:01 +08:00
fix: Fix issue #281
This commit is contained in:
parent
15d67203c9
commit
f3f9a9f480
@ -179,8 +179,10 @@ SPACE=$(df --output=avail -B 1 "$TMP" | tail -n 1)
|
|||||||
(( SYSTEM_SIZE > SPACE )) && error "Not enough free space to create a 4 GB system disk." && exit 87
|
(( SYSTEM_SIZE > SPACE )) && error "Not enough free space to create a 4 GB system disk." && exit 87
|
||||||
|
|
||||||
if ! fallocate -l "${SYSTEM_SIZE}" "${SYSTEM}"; then
|
if ! fallocate -l "${SYSTEM_SIZE}" "${SYSTEM}"; then
|
||||||
|
if ! truncate -s "${SYSTEM_SIZE}" "${SYSTEM}"; then
|
||||||
rm -f "${SYSTEM}" && error "Could not allocate a file for the system disk." && exit 88
|
rm -f "${SYSTEM}" && error "Could not allocate a file for the system disk." && exit 88
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "${ALLOCATE}" == [Zz]* ]]; then
|
if [[ "${ALLOCATE}" == [Zz]* ]]; then
|
||||||
info "Install: Preallocating 4 GB of diskspace..."
|
info "Install: Preallocating 4 GB of diskspace..."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user