FOGProject/fos

Normal wipe is too slow, use shred instead?

Closed this issue · 5 comments

In fog.wipe the following is used for "Normal wipe":
dd if=/dev/zero of="$hd" >/dev/null 2>&1
While a "Full wipe" uses shred:
shred -f -v -z -n 3 "$hd"
On a 500 GB HDD, the "full wipe" takes about 4 hours, while the "normal wipe" takes 5 hours.
I think the reason is likely that the default chunk size is too small when using dd. But I don't understand why you are not using shred with a single pass also for normal wipe?
In particular, shred has the advantage of showing progress, while with dd you don't know how long it will still take to finish.

See also this post in the FOG forum:
https://forums.fogproject.org/topic/8345/normal-wipe-takes-a-long-time-does-not-show-progress

@abulhol Just pushed 8979ef1 to use shred instead. Thanks for your report on this.

Ahhh, just saw you also opened a pull request on this. Sorry, did only see that after I had pushed the commit already. Are you fine with FOG using shred as in 8979ef1?

I am fine with that change, thanks.
The description in the web UI also needs to be updated.
I have tried to do so with PR FOGProject/fogproject#375, but I don't know if it is correct to commit to the master branch?
Shall I commit to working-1.6 or the development branch instead?

Ah sorry, saw in the Development instructions now that it must go to the dev-branch.
FOGProject/fogproject#377

All done, thanks.