Skip to content

Commit

Permalink
Update zerofill.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
padthaitofuhot authored Sep 5, 2018
1 parent 31021ed commit 6ac9ffe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/zerofill.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,15 @@ rm -rf $HOME/admin/bin
### filesys reduction
echo "Defragmenting /"
sudo xfs_fsr -vvvv /
sync; sync

echo "Zero-filling /"
sudo dd if=/dev/zero of=/tmp/zerofill.tmp bs=10M & pid=$!
sleep 5
sleep 2
while sudo kill -USR1 $pid; do sleep 1; done
sync; sync
sudo rm -f /tmp/zerofill.tmp
sync; sync

### shutdown
echo "Powering off"
Expand Down

0 comments on commit 6ac9ffe

Please sign in to comment.