Skip to main content

Managing Solid State Storage Devices

This section covers managing solid state storage devices (SSDs) in your Aerospike nodes. The Aerospike database recovers quickly after adding, removing, or replacing storage devices. You may use any type of storage device in your Aerospike nodes, including SSDs and hard disk drives (HDDs). Aerospike is optimized for SSDs.

SSD changes require a restart. You can use a Fast Start or a Cold Start depending on to if your devices are hot-swappable, and your storage-engine type. The following table summarizes when to use fast start or cold start:

Storage typeHot-swappableNot hot-swappable
pmemfast startcold start
memorycold startcold start
devicefast startcold start
Index stored on

flash or pmem

fast startfast start

Initializing SSDs

You must initialize your SSDs. Initialization removes old data from the SSD, and optimizes SSDs for performance. Refer to Initializing SSDs.

Adding a hot-swap SSD

  1. After you install and initialize a hot-swap SSD, update /etc/aerospike/aerospike.conf with the name of the SSD. We recommend using the World Wide Identifier (WWID), rather than the /dev name, such as /dev/sda or /dev/nvme0n1p1. WWIDs are unique and do not change, while /dev names can change after a restart. Use the ls command to find WWIDs:
ls -l /dev/disk/by-id/

The following is an example of the output from a system with a Non-Volatile Memory Express (NVMe) drive controller. The long output shows that the WWIDs are symlinked to /dev/nvme0n1XX:

lrwxrwxrwx 1 root root 13 Mar  6 07:34 nvme-eui.8ce38e100077d4b6 -> ../../nvme0n1
lrwxrwxrwx 1 root root 15 Mar 6 07:34 nvme-eui.8ce38e100077d4b6-part1 -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 15 Mar 6 07:34 nvme-eui.8ce38e100077d4b6-part2 -> ../../nvme0n1p2
lrwxrwxrwx 1 root root 15 Mar 6 07:34 nvme-eui.8ce38e100077d4b6-part3 -> ../../nvme0n1p3
  1. Enter your SSD partition names in the storage-engine device section of the namespace configuration:
namespace NAMESPACE-NAME {
memory-size SIZE

storage-engine device {
device /dev/disk/by-id/nvme-eui.8ce38e100077d4b6-part1
device /dev/disk/by-id/nvme-eui.8ce38e100077d4b6-part2
device /dev/disk/by-id/nvme-eui.8ce38e100077d4b6-part3
write-block-size 128K
  1. To improve SSD performance, add write-block-size 128K in place of the default block size of 1 MiB.

For server versions prior to 4.2, it is essential to maintain the order of the SSDs in /etc/aerospike/aerospike.conf. For example, if the second SSD fails, then the replacement must be listed second. For versions 4.2 and later, this requirement does not apply, as device configuration order is independent across fast restarts.

Restart Aerospike

Stop and then Fast Start the server if your data is stored on disk (pmem or flash).

Cold Start the server if your data is in memory (shmem).

Refer to index-type to learn about storage types.

Non-hot-swappable devices

If your SSDs are not hot-swappable, you must stop the server to replace them, then launch a cold start if your storage type is shmem.

Launch a fast start when your storage types are pmem or flash.

After the server starts, initialize your new SSDs, then enter the new SSD names in the appropriate namespaces in aerospike.conf.

Managing SSD replacements on multiple nodes

If multiple Aerospike nodes require SSD replacements, perform the same procedure on each node one at a time. Wait for data migrations to complete before continuing to the next node.