How to change storage type in Aerospike?

Hello guys, i’ve just added the new namespace in aerospike, but i’ve make a mistake, i choose storage engine memory but this is wrong, because the storage engine must be device ( in my case). is it safe to change the storage memory of existing namespace? or which way i can go to change that, without deleting namespace? P.S I have a pretty old version 3.7.4 Thank you!

How many nodes and what is the replication factor?

If the answer to both is at least 2 then you can change one node at a time, wait for migrations to complete between each restart.

If either answer is 1 then you will need to take a backup and restore the backup after restarting with the updated configuration.

1 Like

so can i just add to this config let’s say

storage-engine device {
                file /opt/aerospike/data/delivery.dat
                filesize 1G
                data-in-memory true
}

then just restart nodes? is it safe to change storage-engine from memory to device? and i have a 3 node cluster with replication-factor 2

For added safety, you may want to take a backup before doing the rolling restart.

When you restart a node you will lose the copies that node had on memory. With replication factor 2, you will still have another copy. You will need to wait for migrations to complete so that there are two copies of all data again before restarting the next node.

New Solution for Enterprise users:

Regardless of replication-factor, you can use quiesce during your rolling restart process to force the target node to migrate out to other cluster peers. This will maintain the configured replication-factor throughout the configuration change procedure.

The process would resemble the following:

for each node in cluster:
    quiesce the node
    wait for migrations to complete
    stop the node
    reconfigure the storage type for the node in /etc/aerospike/aerospike.conf
    start the node
    continue to the next node (note - we do not need to wait for migrations here)
1 Like

This topic was automatically closed 84 days after the last reply. New replies are no longer allowed.