Adding and Shutting Down a Redundant Storage Manager

Adding and Shutting down a redundant Storage Manager (SM) supports Backup and Restoring Database functionality. For more information, see Copying Current State from a Redundant Storage Manager.

Shutting down a SM decreases the number of failures that the database can tolerate. Consequently, the recommendation is to provision enough resources so that you can shut down a SM without dropping below the database's fault tolerance. To have a redundant SM that can be shut down without dropping below the database's fault tolerance, you should be running a multi-host database on at least three hosts. This ensures that at least two storage managers continue to run whenever a third SM is temporarily shut down.

Adding a Redundant Storage Manager

To add a redundant storage manager, do the following:

Install NuoDB on another host. For information, see Extending the Database Across a Second Host (Scaling Out). Modify your database and increment the SM requirement as required using NuoDB Command's start process command.
nuocmd start process --db-name test --engine-type SM --archive-id <archive ID> --server-id <server ID>

Shutting Down a Redundant Storage Manager

To shut down a redundant storage manager, do the following:

1. Run the show domain command to identify the SM to be shut down.

nuocmd show domain
nuocmd show domain
server version: 4.0.rel40dev-21-546a5cbef7, server license: Enterprise
server time: 2019-05-15T19:09:17.123, client token: 07e10b90d4d5c47719116366d4a86ff95767867e
  [server0] server0:48005 (LEADER, Leader=server0) ACTIVE:Connected *
  [server1] server1:48005 (FOLLOWER, Leader=server0) ACTIVE:Connected
  [server2] server2:48005 (FOLLOWER, Leader=server0) ACTIVE:Connected
  test [RUNNING]
    [SM] server0:48007 (Default) [start_id = 0] [server_id = server0] [pid = 144] [node_id = 1] MONITORED:RUNNING
    [TE] server1:48006 (Default) [start_id = 1] [server_id = server1] [pid = 103] [node_id = 2] MONITORED:RUNNING
    [SM] server1:48006 (Default) [start_id = 2] [server_id = server1] [pid = 159] [node_id = 3] MONITORED:RUNNING
    [TE] server2:48006 (Default) [start_id = 3] [server_id = server0] [pid = 281] [node_id = 4] MONITORED:RUNNING
    [SM] server2:48007 (Default) [start_id = 4] [server_id = server1] [pid = 180] [node_id = 5] MONITORED:RUNNING
    [TE] server0:48007 (Default) [start_id = 5] [server_id = server0] [pid = 152] [node_id = 6] MONITORED:RUNNING

2. Shut down the required SM using either NuoDB Command's shutdown process command.

nuocmd shutdown process --start-id 4

If you intend restarting the SM at some point on that archive after making a copy of it, it is enough to just run the shutdown process command.

Note: When shutting down SMs, consideration must be given to whether they are to be restarted thereafter. NuoDB Admin retains the archive even after the process has exited and expects a new SM process to be started on that archive.If an SM is temporary and is not to be restarted on the archive, it is necessary to also run the delete archive command as follows:

delete archive --archive-id <archive id of the archive being backed up> --purge

The above script indicates to NuoDB Admin that the archive is not required to come back online.