Adding and Shutting Down a Redundant Storage Manager
The following instructions guide the user through adding an additional Storage Manager (SM) referred to here as an "Redundant" SM. There may be several use cases for this scenario, include support for making a copy of the SM’s archive and restoring it to a new database. 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.
To add a redundant storage manager, 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 hockey --engine-type SM --archive-id <archive ID> --server-id <server ID>
To shut down a redundant storage manager,
nuocmd show domaincommand to identify the SM to be shut down.
nuocmd show domain server version: 4.1.1, server license: Enterprise server time: 2020-09-15T17:05:27.123, client token: 07e10b90d4d5c47719116366d4a86ff95767867e Servers: [nuoadmin-0] host1:48005 (LEADER, Leader=nuoadmin-0) ACTIVE:Connected * [nuoadmin-1] host2:48005 (FOLLOWER, Leader=nuoadmin-0) ACTIVE:Connected [nuoadmin-2] host3:48005 (FOLLOWER, Leader=nuoadmin-0) ACTIVE:Connected Databases: hockey [RUNNING] [SM] host1:48007 (Default) [start_id = 0] [server_id = nuoadmin-0] [pid = 144] [node_id = 1] MONITORED:RUNNING [TE] host2:48006 (Default) [start_id = 1] [server_id = nuoadmin-1] [pid = 103] [node_id = 2] MONITORED:RUNNING [SM] host2:48006 (Default) [start_id = 2] [server_id = nuoadmin-1] [pid = 159] [node_id = 3] MONITORED:RUNNING [TE] host3:48006 (Default) [start_id = 3] [server_id = nuoadmin-0] [pid = 281] [node_id = 4] MONITORED:RUNNING [SM] host3:48007 (Default) [start_id = 4] [server_id = nuoadmin-1] [pid = 180] [node_id = 5] MONITORED:RUNNING [TE] host1:48007 (Default) [start_id = 5] [server_id = nuoadmin-0] [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 to restart the SM at some point on that archive after making a copy of it, it is enough to just run the
shutdown process command.
|When shutting down SMs, consideration must be given to whether they are to be restarted thereafter. NuoDB Admin retains the archive and its data even after the process has exited and expects a new SM process will be started on that archive.|
If an SM is temporary and will not to be restarted on an archive, then also run the
delete archive command to delete the archive from the Admin as follows:
nuocmd delete archive --archive-id <archive id> --purge
This command does not delete the archive from the file system.
To remove the archive from the file system run the OS CLI command to delete the archive directory (e.g. using the Linux