FOGProject / fos

FOG Operating System
31 stars 33 forks source link

Normal wipe is too slow, use shred instead? #38

Closed abulhol closed 4 years ago

abulhol commented 4 years ago

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

Sebastian-Roth commented 4 years ago

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

Sebastian-Roth commented 4 years ago

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?

abulhol commented 4 years ago

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 https://github.com/FOGProject/fogproject/pull/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?

abulhol commented 4 years ago

Ah sorry, saw in the Development instructions now that it must go to the dev-branch. https://github.com/FOGProject/fogproject/pull/377

Sebastian-Roth commented 4 years ago

All done, thanks.