Filling SMR disks with random data efficiently
- Login o registrati per inviare commenti
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.
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?
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
You are right. They are still there. I guess I did not look correctly.
- Login o registrati per inviare commenti