Disk Wipe progress bar bug

Status
Not open for further replies.

statik

Explorer
Joined
Sep 8, 2013
Messages
71
I have been wiping a lot of disks, and every time the disk wipe progress bar goes away at around 38%. The disk is still being wiped because I can see the hard drive light constantly blinking and the DD process is still running.
 

statik

Explorer
Joined
Sep 8, 2013
Messages
71
Forgot to mention I am using FreeNAS 9.1.1
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Well, the problem is there isn't a very effective way to identify how far done a dd command actually is. You type the dd command, hit enter, and then wait until its done. The %s you are seeing are probably just based on a timer(but don't quote me on that). In all honesty, when i want to wipe drives I do them from the CLI myself(or from the GUI) and go to bed and continue with stuff the next morning. Also keep in mind that unless you are planning to sell the disks to someone used a full wipe really isn't very useful. The quick wipe will effectively wipe out the partition table making the disks "unformatted".
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
Use Darik's Boot & Nuke instead. It'll give you an idea in hh:mm of how long it will take.

If you're re-using disks, use the "quick erase". If I were disposing of the disks, I'd use DoD-5220.22-M. The latter might take days.
 

statik

Explorer
Joined
Sep 8, 2013
Messages
71

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
Well, the problem is there isn't a very effective way to identify how far done a dd command actually is. You type the dd command, hit enter, and then wait until its done.
No, dd can actually give you progress reports. Try this:
In one shell (ssh session) execute:
dd if=/dev/zero of=/dev/null bs=1m
In another shell do:
killall -INFO dd
Check your first shell -- every time dd receives the SIGINFO signal (that's what the killall does) it prints out how much did it already transfer. FreeNAS is using this to drive the progress bar. Check function disk_wipe in notifier.py and function disk_wipe_progress in views.py. It if doesn't work properly then it's probably a bug.
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
Can I do a quick disk wipe from the Shell on more then one drive at a time?
FreeNAS quick wipe overwrites the first megabyte and the last 4 megabytes of the drive (if I read the sources right :) ). This is how you run the quick wipe from CLI:
python /usr/local/www/freenasUI/middleware/notifier.py disk_wipe [devicename]
[devicename] is just the device name, not the full path (e.g. ada0, not /dev/ada0).
(It responds None if everything went well.)
 

titan_rw

Guru
Joined
Sep 1, 2012
Messages
586
If you're wiping disks from the command line (which I do when doing full disk wipes), just use dd, and control-t to tell where it is. It won't give you a pretty percent done, or time remaining, but you can see how many bytes it's wiped, and roughly calculate from there. I never bother sending signals with kill(all). Control-T is easier. If I'm not at the ssh session to press control-T, then I probably don't care too much about a progress update.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Never knew Control-T would do that.. cool tip!
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
Yes, Ctrl-T sends SIGINFO in most terminals, totally forgot about that.
 

titan_rw

Guru
Joined
Sep 1, 2012
Messages
586
Ahh, is that how it works.

I do notice that with the same putty as I use to connect to bsd, if I connect to linux, control-T doesn't work with dd. Not sure if it's a TERM thing on linux, or that a different signal is used in gnu-dd.

Very happy overall with bsd as compared to linux. As other people have said, linux (more specificaly gnu?) tend to "do their own thing".

One other difference I noticed, bsd dd will accept something like "bs=1m". gnu-dd doesn't like that. You have to use "bs=1024k".
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
SIGINFO does not exist in Linux. GNU dd will display progress when you send SIGUSR1, but I think there is no keyboard combination for that, so your only option is kill/killall.
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,403
If I were disposing of the disks, I'd use DoD-5220.22-M. The latter might take days.
Actually, a multi-pass random wipe would be best. It doesn't make sense to use known patterns. Still, any multi-pass wipe is likely more than sufficient.
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
Still, any multi-pass wipe is likely more than sufficient.
Actually, single pass is more than sufficient:
The urban legend of multipass hard disk overwrite and DoD 5220-22-M
Can Intelligence Agencies Read Overwritten Data?
If you overwrite once a script kiddie will not be able to read data. However, if somebody is able to throw such resources (as claimed by Gutmann: Magnetic Force Scanning Tunneling Microscopy and what not) at getting your data (if it even works, check the linked articles) then you have already lost. There are many easier options to get your data. They will not wait for you to sell your used drive on eBay.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Actually, single pass is more than sufficient:
The urban legend of multipass hard disk overwrite and DoD 5220-22-M
Can Intelligence Agencies Read Overwritten Data?
If you overwrite once a script kiddie will not be able to read data. However, if somebody is able to throw such resources (as claimed by Gutmann: Magnetic Force Scanning Tunneling Microscopy and what not) at getting your data (if it even works, check the linked articles) then you have already lost. There are many easier options to get your data. They will not wait for you to sell your used drive on eBay.

I was going to say the same thing. It's one of those "theoretical" things that everyone talks about but nobody has actually proven that its even possible with current or future technology, regardless of cost. It's like nuclear fusion reactors. There's lots of theoretical info that says its possible, but despite the billions of dollars spent, nobody has ever made a nuclear fusion reactor that could generate electricity regardless of cost.
 
Status
Not open for further replies.
Top