Task for an Identical Node
-
Prerequisite information:
-
The hostname and port number (registry port) of the machine in the cluster where the admin process is running ( e.g “host1” and 5000).
-
The ID of the Storage Node to replace (e.g. "sn1").
Note:
The user can use the Admin CLI ping command to get the registry port and Storage Node Identifier of any failed Storage Node. -
Before starting the new Storage Node, the Storage Node to be replaced must be taken down. This can be done administratively or via failure.
Note:
The instructions below assume that the KVROOT in the target host is empty and has no valid data. When the new Storage Node Agent begins it starts the services that it hosts, which recovers their data from other hosts. The time taken for the recovery depends on the size of the shards involved and it happens in the background.
-
-
Create the configuration file of the failed host using the
generateconfig
command. Thegenerateconfig
command can be executed from any active host (machine) in the NoSQL cluster.The generateconfig's usage is:
> java -Xmx64m -Xms64m \ -jar KVHOME/lib/kvstore.jar generateconfig \ -host <hostname> -port <port> -sn <StorageNodeId> -target <zipfile> \ -security <path to security login file>
Parameter Required Description host
Yes The host name of the failed storage node for which the config file is generated. port
Yes The registry port of the failed storage node for which the config file is generated. sn
Yes Identifier of the failed storage node. target
Yes Full path of the zip file to be created. security
No The client security configuration file. This parameter is only required if your store is secure. A fully qualified path to a file containing security information can be specified. For more information on generateconfig command, See generateconfig
For example:
> java -Xmx64m -Xms64m \ -jar KVHOME/lib/kvstore.jar generateconfig -host adminhost \ -port 13230 -sn sn1 -target /tmp/sn1.config.zip \ -security USER/security/admin.security
The command above creates the target "
/tmp/sn1.config.zip
" . This is a zip file with the required configuration to re-create the failed Storage Node. The top-level directory in the newly created zip file (sn1.config.zip
) is the store's KVROOT.Note:
This assumes that you must have followed the steps as mentioned in Create users and configure security with remote access.
-
Restore the Storage Node configuration on the target host:
-
Copy the zip file
"sn1.config.zip"
to the target host. -
Unzip the archive into your target host's
KVROOT
directory. That is, ifKVROOT
is/opt/kvroot
, then do the following:> cd /opt > unzip <path-to-sn1.config.zip>
Note:
Ifkvroot
already exists under/opt
directory , remove all the contents in thekvroot
directory before unzipping the config file.
-
-
Restart the Storage Node on the target host.
> java -Xmx64m -Xms64m \ -jar KVHOME/lib/kvstore.jar start -root KVROOT
Note:
The hostname, port number and internet address of the target host and the failed node are the same. So no changes have to be done in the Storage Node pool and the topology of the store.