mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-02-24 13:30:02 +08:00
Add full preallocation (writing zeroes)
This commit is contained in:
parent
e65ab41b7c
commit
0f99873f60
@ -124,11 +124,10 @@ if [ "$ALLOCATE" != "F" ]; then
|
|||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
MB=$(( (SYSTEM_SIZE + 1048575)/1048576 ))
|
GB=$(( (SYSTEM_SIZE + 1073741823)/1073741824 ))
|
||||||
echo "INFO: Writing ${MB} MB of zeroes, please wait.."
|
echo "INFO: Writing ${GB} GB of zeroes, please wait.."
|
||||||
|
|
||||||
dd if=/dev/zero of="${SYSTEM}" count="${MB}" bs=1M
|
dd if=/dev/zero of="${SYSTEM}" count="${SYSTEM_SIZE}" bs=1M iflag=count_bytes
|
||||||
truncate -s "${SYSTEM_SIZE}" "${SYSTEM}"
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user