Use dd to zero out disk space (hopefully faster)

This commit is contained in:
Bob Lantz
2013-06-19 17:26:39 -07:00
parent 8f113b48cc
commit 5c5a1eae8a
+5 -2
View File
@@ -578,8 +578,11 @@ function vm_clean {
git config --global user.name "None"
git config --global user.email "None"
echo "Zeroing out file blocks for efficient compaction"
time sudo cp /dev/zero /tmp/; sync ; sleep 1 ; sync ; sudo rm -f /tmp/zero
# Note: you can shrink the .vmdk in vmware using
# vmware-vdiskmanager -k *.vmdk
echo "Zeroing out file blocks for efficient compaction..."
time sudo dd if=/dev/zero of=/tmp/zero bs=1M
sync ; sleep 1 ; sync ; sudo rm -f /tmp/zero
}