diff options
author | Christian Rebischke <Chris.Rebischke@posteo.de> | 2017-08-07 20:40:54 +0200 |
---|---|---|
committer | Christian Rebischke <Chris.Rebischke@posteo.de> | 2017-08-07 20:40:54 +0200 |
commit | 66a78afe5bdd04b7247239e3cd0772ef45a08f24 (patch) | |
tree | 645d9db6754bfd08a34b7e9c9b999c960a5a7720 /provision/write_zeroes.sh | |
parent | c39cbfa32885b286e64f000f2ebbd768bf06f090 (diff) | |
download | arch-boxes32-66a78afe5bdd04b7247239e3cd0772ef45a08f24.tar.xz |
making the zero write optional
Diffstat (limited to 'provision/write_zeroes.sh')
-rw-r--r-- | provision/write_zeroes.sh | 10 |
1 files changed, 10 insertions, 0 deletions
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 |