FAQ - When is blkdiscard preferable to dd?

FAQ - When is blkdiscard preferable to dd?

Detail

In some circumstances it may be necessary to remove all data from an SSD drive used by Aerospike. There are multiple methods of doing this, two of the most common being dd and blkdiscard. Which is better to use in what circumstances?

Answer

The dd approach will mark all sectors on the SSD as ‘used’ as it writes zeros across the disk. This interferes with the ability of the SSD to perform sector reallocations, native trim and wear levelling, as all sectors are now deemed occupied. blkdiscard on an SSD only marks the sectors as unused so that they are treated as all zeros. For this reason, blkdiscard is preferred in most cases. However, on AWS instances, blkdiscard instead performs an OPAL rotation on the data, which leaves it with garbage data. In this case, dd is the better option.

Keywords

DD BLKDISCARD ZERO SSD AWS OPAL ROTATION

Timestamp

March 2020

© 2015 Copyright Aerospike, Inc. | All rights reserved. Creators of the Aerospike Database.