On Mon, Jun 01, 2020 at 06:58:01AM -0700, Justin Noor wrote:
| Hi Misc,
| 
| Has anyone ever filled a 4TB disk with random data and/or zeros with
| OpenBSD?

I do this before disposing of old disks.  Have written random data to
several sizes of disk, not sure if I ever wiped a 4TB disk.

| How long did it take? What did you use (dd, openssl)? Can you share the
| command that you used?

It takes quite some time, but OpenBSD (at least on modern hardware)
can generate random numbers faster than you can write them to spinning
disks (may be different with those fast nvme(4) disks).

I simply used dd, with a large block size:

        dd if=/dev/random of=/dev/sdXc bs=1048576

And then you wait.  The time it takes really depends on two factors:
the size of the disk and the speed at which you write (whatever the
bottleneck).  If you start, you can send dd the 'INFO' signal (`pkill
-INFO dd` (or press Ctrl-T if your shell is set up for it with `stty
status ^T`))  This will give you output a bit like:

30111+0 records in
30111+0 records out
31573671936 bytes transferred in 178.307 secs (177074202 bytes/sec)

Now take the size of the disk in bytes, divide it by that last number
and subtract the second number.  This is a reasonable ball-park
indication of time remaining.

Note that if you're doing this because you want to prevent others from
reading back even small parts of your data, you are better of never
writing your data in plain text (e.g. using softraid(4)'s CRYPTO
discipline), or (if it's too late for that), to physically destroy the
storage medium.  Due to smart disks remapping your data in case of
'broken' sectors, some old data can never be properly overwritten.

Cheers,

Paul 'WEiRD' de Weerd

-- 
>++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
+++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
                 http://www.weirdnet.nl/                 

Reply via email to