Copy Admin Node database
When adding Admin Nodes through an expansion procedure, you can optionally copy the database from the primary Admin Node to the new Admin Node. Copying the database allows you to retain historical information about attributes, alerts, and alerts.
-
You have completed the required expansion steps to add an Admin Node.
-
You have the
Passwords.txt
file. -
You have the provisioning passphrase.
The StorageGRID software activation process creates an empty database for the NMS service on the expansion Admin Node. When the NMS service starts on the expansion Admin Node, it records information for servers and services that are currently part of the system or added later. This Admin Node database includes the following information:
-
Alert history
-
Historical attribute data, which is used in legacy-style charts on the Nodes page
To ensure that the Admin Node database is consistent between nodes, you can copy the database from the primary Admin Node to the expansion Admin Node.
Copying the database from the primary Admin Node (thesource Admin Node) to an expansion Admin Node can take up to several hours to complete. During this period, the Grid Manager is inaccessible. |
Use these steps to stop the MI service and the Management API service on both the primary Admin Node and the expansion Admin Node before copying the database.
-
Complete the following steps on the primary Admin Node:
-
Log in to the Admin Node:
-
Enter the following command:
ssh admin@grid_node_IP
-
Enter the password listed in the
Passwords.txt
file. -
Enter the following command to switch to root:
su -
-
Enter the password listed in the
Passwords.txt
file.
-
-
Run the following command:
recover-access-points
-
Enter the provisioning passphrase.
-
Stop the MI service:
service mi stop
-
Stop the Management Application Program Interface (mgmt-api) service:
service mgmt-api stop
-
-
Complete the following steps on the expansion Admin Node:
-
Log in to the expansion Admin Node:
-
Enter the following command:
ssh admin@grid_node_IP
-
Enter the password listed in the
Passwords.txt
file. -
Enter the following command to switch to root:
su -
-
Enter the password listed in the
Passwords.txt
file.
-
-
Stop the MI service:
service mi stop
-
Stop the mgmt-api service:
service mgmt-api stop
-
Add the SSH private key to the SSH agent. Enter:
ssh-add
-
Enter the SSH Access Password listed in the
Passwords.txt
file. -
Copy the database from the source Admin Node to the expansion Admin Node:
/usr/local/mi/bin/mi-clone-db.sh Source_Admin_Node_IP
-
When prompted, confirm that you want to overwrite the MI database on the expansion Admin Node.
The database and its historical data are copied to the expansion Admin Node. When the copy operation is done, the script starts the expansion Admin Node.
-
When you no longer require passwordless access to other servers, remove the private key from the SSH agent. Enter:
ssh-add -D
-
-
Restart the services on the primary Admin Node:
service servermanager start