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.

Adding a Redundant Storage Manager

To add a redundant storage manager, install NuoDB on another host. For information, see Extending the Database Across a Second Host (Scaling Out). Create an archive object using the nuocmd create archive command and then start the SM using the nuocmd start process command.

nuocmd create archive --db-name hockey --server-id <server ID> --archive-path <archive path>
nuocmd start process --db-name hockey --engine-type SM --archive-id <archive ID> --server-id <server ID>

Shutting Down a Redundant Storage Manager

To shut down a redundant storage manager,

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

nuocmd show archives

This will list all the attributes of the current or last running SM on each archive object in the domain state. If there is a running SM on an archive, then its start ID will be present in the nuocmd show archives output.

2. Shut down the SM by using the nuocmd shutdown process command.

nuocmd shutdown process --start-id <start ID>

Deleting an Archive and its Storage

To scale down a database permanently, use the nuocmd delete archive command to delete the archive object from the domain state as follows:

nuocmd delete archive --archive-id <archive ID> --purge

This command does not delete the archive data from the file system. To remove the archive data from the file system, delete the archive directory directly (e.g. by using the rm command on Linux).