Filling SMR disks with random data efficiently

3 Antworten [Letzter Beitrag]
nadebula.1984
Offline
Beigetreten: 05/01/2018

For SMR (shingled magnetic recording) disks, random writing is laughably inefficient. But if you have one SMR disk anyway (e.g., it came with a new computer) and want to deploy FDE (full disk encryption) on it, you can try to increase the block size to make the writing process more sequential (less random). For example:

# dd bs=128M if=/dev/urandom of=/dev/sdX

I wiped out a 2-TB 2.5-inch SMR disk (WD20SPZX) this way within 7 or 8 hours. Default parameters roughly take twice long.

Until recently, the disk wiping utility (when configuring encrypted volumes) in Debian Installer still hasn't optimized for SMR, so you need to wipe the disk before configuring FDE.

eric23
Offline
Beigetreten: 06/30/2017

I always thought urandom wrote random bits rather than random places.

Why do I not seem to have these devices on my system? Are /dev/*random part Linux and did not get compiled or is it a separate package?

Magic Banana

I am a member!

I am a translator!

Offline
Beigetreten: 07/24/2010

They are part of the kernel. Grepping "RANDOM" in Linux's configuration file, I could not identify anything relevant. Have you configured your own kernel? Are you sure the following command outputs nothing?
$ ls /dev/*random

eric23
Offline
Beigetreten: 06/30/2017

You are right. They are still there. I guess I did not look correctly.