Articles in this section

How to zeroize multiple storage devices simultaneously?

Context

Customer may need to  dd (erase) multiple disk on a server. This can occur when initializing a system configured for multiple storage-engine devices (ssd, nvmes, raw disk partitions) .


Method

If your disks support blkdiscard (most SSDs or non Cloud environments), 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 -z /dev/sdb
    blkdiscard -z /dev/sdc
    ...

Or in a loop:


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


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

 

The following parameters can be added to monitor pro

 


 

 

Applies To Earliest Version

Pre 4.9


Applies To Latest Version

Current Version


Was this article helpful?
0 out of 0 found this helpful