Deprovisioning Hosts in a Multi-Host Configuration (Scaling In)
If you need to scale in your database, that is reduce the number hosts participating in the NuoDB Domain, you will need to deprovision the required host(s) from your NuoDB domain by removing the host’s 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>
For example, to deprovision a server called nuoadmin-1 run the following command:
nuocmd delete server --server-id nuoadmin-1
Verifying That Hosts have been deprovisioned
To confirm that nuoadmin-1 and its associated database processes on host2 have been removed, run the
show domain command.
nuocmd show domain server version: 4.1.1, server license: Enterprise server time: 2020-09-12T09:12:37.792000, client token: 0350ad7d525c1b65c0530a799830bc73cce9558c Servers: [nuoadmin-0] host1:48005 (LEADER, Leader=nuoadmin-0) ACTIVE:Connected * Databases: hockey [RUNNING] [SM] host1:48007 (Default) [sid = 2] [server = nuoadmin-0] MONITORED:RUNNING [TE] host1:48006 (Default) [sid = 3] [server = nuoadmin-0] 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 installation:
rm /var/opt/nuodb/raftlog systemctl start nuoadmin
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
Starting NuoDB Admin on a Reprovisioned host
To start NuoDB Admin on a reprovisioned host, see Starting NuoDB Admin.
To start databases processes on this host, use the
start database command with the
--incremental option (see 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 Archives.