Zeroize Multiple SSD's Simultaneously


#1

Synopsis:

Need to find a way to dd multiple disk on a server Solution: There may need to Zero multiple drive in the same

Solution:

If your disks support blkdiscard (most SSDs), you should use that instead. blkdiscard instructs the SSD disk to discard blocks and treat them as unused/zeroed. This results in an operation that takes a few seconds only and removes the need to DD the disks.

blkdiscard /dev/sdb
blkdiscard /dev/sdc
...

Or in a loop:

for i in sdb sdc sdd sde ; do blkdiscard /dev/"${i}" ; done

Command line example to zeroize sdb, sdc, sdd, and sde at the same time using dd:

dd if=/dev/zero bs=128k | tee /dev/sdb | tee /dev/sdc | tee /dev/sde > /dev/sdd

CRITICAL: drive set with unmatched headers
Aerospike start problem
What happens if the device order in a namespace is accidentally changed
If I remove a namespace from the configuration file, will all the data in that namespace get deleted?
How to expand device size with existing data
Recovering from Available Percent Zero
How do I rename an existing namespace in an Aerospike cluster?
#2

This was written before learning of blkdiscard which will only work on SSDs. This uses the disks TRIM API to zero the a disk and I have seen this be significantly faster than using dd (locally zeroed a 480 GB drive in about 8 seconds with blkdiscard).