Deprovisioning Hosts in a Multi-Host Configuration (Scaling In)

If you need to deprovision a host and free up its resources for other purposes, you must remove its membership from the domain state. To deprovision a host, run the delete server command from a host in the domain other than the host being deprovisioned.

nuocmd delete server --server-id <serverid>

Note: The delete server command is issued using NuoDB Command (nuocmd). For more information on NuoDB Command and other command line tools, see Command Line Tools.

For example, to deprovision a server called server1 run the following command:

nuocmd delete server --server-id server1

Verifying That Hosts have been Deprovisioned

To confirm that server1 and its associated database processes on host2 have been removed, run the show domain command.

nuocmd show domain
server version: 3.3.5472-a571fd0b3c, server license: Enterprise
server time: 2018-06-08T06:52:35.792000, client token: 0350ad7d525c1b65c0530a799830bc73cce9558c
Servers:
[server0] host1:48005 (LEADER, Leader=Server0) ACTIVE:Connected *
Databases:
test [RUNNING]
[SM] host1:48007 (Default) [sid = 2] [server = server0] MONITORED:RUNNING
[TE] host1:48006 (Default) [sid = 3] [server = server0] MONITORED:RUNNING

Reprovisioning Hosts in a Multi-Host Configuration

When reprovisioning a host previously in place, you can either remove or preserve the existing archive if one exists. When you remove the archive, the reprovisioning task creates a new archive and fully synchronizes the new SM with an active SM on another host. When preserving an archive, it automatically synchronizes with an active SM.

Removing Raftlog and Starting NuoDB Admin

When reprovisioning a host, the raftlog file contains domain and database lifecycle state information that is no longer needed, and should be removed. To remove raftlog and restart NuoDB Admin on the host to be reprovisioned, run one of the following sets of commands:

For RPM / DEB installation:

rm /var/opt/nuodb/raftlog
service nuoadmin start

For TAR installation:

$NUODB_HOME/var/opt/raftlog
$NUODB_HOME/etc/nuoadmin start

For Windows installation:

net stop NuoDBadmin
delete C:\ProgramData\nuodb\raftlog
net start NuoDBadmin

Note: A new raftlog file is created when a NuoDB Admin process is started.

Starting NuoDB Admin on a Reprovisioned host

To start NuoDB Admin on a reprovisioned host, see Starting and Stopping NuoDB Admin.

To start databases processes on this host, use the start database command with the --incremental option (see Step 1 - Installing NuoDB on a Second Host).

To preserve the reprovisioned host’s archive, use the archive command with the --restored option. For information on restoration, see Restoring a Database Using an Archive.