From 66a78afe5bdd04b7247239e3cd0772ef45a08f24 Mon Sep 17 00:00:00 2001 From: Christian Rebischke Date: Mon, 7 Aug 2017 20:40:54 +0200 Subject: making the zero write optional --- provision/write_zeroes.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 provision/write_zeroes.sh (limited to 'provision/write_zeroes.sh') diff --git a/provision/write_zeroes.sh b/provision/write_zeroes.sh new file mode 100644 index 0000000..a7fac3e --- /dev/null +++ b/provision/write_zeroes.sh @@ -0,0 +1,10 @@ +#/bin/bash + +set -e +set -x + +# Write zeros to improve virtual disk compaction. +zerofile=$(/usr/bin/mktemp /zerofile.XXXXX) +dd if=/dev/zero of="$zerofile" bs=1M || true +rm -f "$zerofile" +sync -- cgit v1.2.3-70-g09d2