Update SUMMARY: how to clear data quickly

2007-12-24 22:06:00

Very thanks Jay Lessert , who points out newfs doesn't do anything to data blocks, therefore,
it is not appropriate solution to wipe out data.
label in format doesn't really touch data also.

the most popular one is

dd if=/dev/zero of=/dev/dsk/c0t1d0s2 bs=1024k
which takes half to an hour to clear one 9GB SCIS disk, but it can run multiple dd processes simultaneously to deal with
more than one disk

an alternative, An appropriate low-security disk wipe would be something like:

[edited for brevity, format is more verbose]
% sudo format -d c1t3d0
format> analyze
analyze> setup
Analyze entire disk[yes]?
Loop continuously[no]?
Enter number of passes[2]: 1
Repair defective blocks[yes]?
Stop after first error[no]?
Use random bit patterns[no]? yes
Enter number of blocks per transfer[126, 0/0/126]:
Verify media after formatting[yes]?
Enable extended messages[no]? yes
Restore defect list[yes]?
Restore disk label[yes]?

analyze> write
pass 0 - pattern = 0x657eb725

This probably takes about the same time as dd-ing /dev/zero in, the
pseudo-random data gives a far better wipe than all-zeros, it imposes
just about zero cpu load (unlike dd), and your SCSI chain should be
able to run four of these in parallel with no slowdown.
This doesn't protect you against government "TLA" agencies, but it gets
everybody else. :-)

Comments

Got something to say?

You must be logged in to post a comment.