I am currently using sfill
to wipe free space in my root partition ( /dev/sdaX
). Its default setting is a 38 pass sudo sfill -v directory/mountpoint
but its taking hours to complete this step. I then tried to use less secure three pass method sudo sfill -lv directory/mountpoint
the problem is its taking fairly the same amount of time to wipe free space as the default. It is due to dev/urandom
which peaks at 13MB/s. While searching for an alterntive method to speed up free space wiping step, I reached this link which uses openssl
to randomize the wipe.
openssl rand $(</proc/partitions awk '$4=="sda" {print $3*1024}') >/dev/sda
Is this a good way to wipe free space in root drive or other safer method exists? In the above command sda
is our root partion sdaX
, right?
dd if=/dev/urandom bs=1M count=1000 | pv >/dev/null
shows that /dev/urandom runs at least at 170MB/s (about 5 seconds/GB).dd if=/dev/urandom bs=1M of=/somebigfile
is about as fast as you can get. – xenoid Apr 14 '18 at 07:01