delete-node
On this page
Description
Completely removes a node and its data from the cluster.
Note that this action is only reversible by deploying a new leaf in the same location, attaching it, and rebalancing partitions.
This command removes the specified node from the cluster and deletes its data.
A node must be stopped before it can be deleted.
If --memsql-id
, or --memsql-cnf
, or --all
is not specified, memsqlctl
will prompt the user to select a node from a table.
If --memsql-cnf
is specified, memsqlctl
will attempt to first delete the specifieddirectories in the config (datadir
, plancachedir
, tracelogsdir
, etc.memsqlctl
will delete the memsql.
file itself and its record in the node metadata file, nodes.
.
To remove a leaf node from the cluster without deleting its data, and with the ability to add it back to the cluster, refer to the memsqlctl remove-leaf command.
Usage
Usage:
memsqlctl delete-node [flags]
Flags:
-a, --all Delete all nodes on the host
-h, --help Help for delete-node
--memsql-id strings the node ID of the node to delete
--stop Stop each node before deletion
Global Flags:
-c, --config FILE_PATH Path to the memsqctl config file
--default-install-dir DIRECTORY_PATH Path to the default install directory
--insecure-ssl Fall back to insecure SSL connections to local nodes if memsqlctl is unable to otherwise establish a connection (ADVANCED)
-j, --json Print output in JSON format
--node-metadata-file FILE_PATH Path to the node metadata file
--parallelism POSITIVE_INTEGER Maximum amount of operations to be run in parallel
--ssl-ca FILE_PATH The path to the CA certificate file (in PEM format) to authenticate the database certificate
--timeout duration Maximum time for operation to complete (e.g., 30s, 10m, 1.5h)
--verbose-json Print output in JSON format, include some warnings and user messages
-v, --verbosity count Increase logging verbosity
-y, --yes Enable non-interactive mode and assume the user would like to move forward with the proposed actions by default
Remarks
-
This command is interactive unless you use either
--yes
or--json
flag to override interactive behavior. -
The
memsqlctl delete-node
command is equivalent to the sdb-admin delete-node command.
Output
The following is the standard output for the delete-node
command.
sudo memsqlctl delete-node
memsqlctl will perform the following actions:
· Delete SingleStore node
- Base directory and contents: /var/lib/memsql/61cbf018-4256-4c43-82a7-530220e5817b
Would you like to continue? [y/N]: y
✓ Deleted node defined by MemSQL config file /var/lib/memsql/61cbf018-4256-4c43-82a7-530220e5817b/memsql.cnf
Last modified: April 22, 2024