Use dd to zero out disk space (hopefully faster)
This commit is contained in:
+5
-2
@@ -578,8 +578,11 @@ function vm_clean {
|
|||||||
git config --global user.name "None"
|
git config --global user.name "None"
|
||||||
git config --global user.email "None"
|
git config --global user.email "None"
|
||||||
|
|
||||||
echo "Zeroing out file blocks for efficient compaction"
|
# Note: you can shrink the .vmdk in vmware using
|
||||||
time sudo cp /dev/zero /tmp/; sync ; sleep 1 ; sync ; sudo rm -f /tmp/zero
|
# 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
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user