Skip to main content
Loading

Initializing SSDs

Overview

This page describes how to initialize Flash devices (SSD and NVMe).

You must initialize SSDs before using them in an Aerospike deployment. Initializing SSDs ensures that old data, partitioning, and master boot records (MBRs) do not interfere with Aerospike operations. Older devices containing Aerospike data must be entirely zeroized before reuse, but to save time, newly-provisioned devices can have their headers zeroized and the rest of the write blocks trimmed.

You can initialize multiple SSDs in a single operation, as described in How to zeroize multiple storage devices simultaneously.

New SSDs

Newly-provisioned devices from cloud service providers are new partitions of existing drives that have not been zeroized, meaning they may still contain some data or random noise instead of zeros. Because of the way Aerospike works, accessing raw blocks on the device without a storage system, any non-zero blocks on the drive may get reinterpreted by Aerospike and affect your operations.

For new SSDs, zeroize the 8 MiB device header using blkdiscard -z, included on most Linux distributions in the util-linux package.

blkdiscard -z --length 8MiB /dev/DEVICE_ID

Used SSDs

If the drive was previously part of an Aerospike deployment, you need to fully zeroize it before use.

First, check whether your drive supports RZAT (Read Zero After Trim). See this article for a non-exhaustive list maintained by Wikipedia.

  1. If the drive supports RZAT, perform a trim on the entire device:
    blkdiscard /dev/DEVICE_ID
    Then zeroize the 8 MiB header:
    blkdiscard -z --length 8MiB /dev/DEVICE_ID
  2. If the drive does not support RZAT, you must zeroize the entire device, not just the header:
    blkdiscard -z /dev/DEVICE_ID