YMatrix
Quick Start
Simulate Time Series Scenarios
Standard Cluster Deployment
Data Modeling
Connecting to The database
Data Writing
Data Migration
Data Query
Scene Application Examples
Federal Query
Maintenance and Monitoring
Global Maintenance
Partition Maintenance
Backup and Restore
Cluster Expansion
Enable Mirroring
Resource Management
Security
Monitoring
Performance Tuning
Troubleshooting
Reference Guide
Tool Guide
Data Type
Storage Engine
Execution Engine
Stream Processing
DR (Disaster Recovery)
Configuration Parameters
Index
Extension
SQL Reference
FAQ
This document introduces mxinitstandby, a tool for adding and removing standby nodes.
Notes!
mxinitstandby must be executed by a user with sudo privileges on the master node (except for mxadmin, which requires the absolute path/opt/ymatrix/matrixdb6/bin/mxinitstandby
).
Initializes, initializes, or removes Standby nodes for the YMatrix database system.
The following is a detailed introduction to the command-line parameters:
Subcommand | Parameter name | Description | Optional |
---|---|---|---|
init | Convert the collected information into a basic plan | ||
--db-cluster-id | Database cluster ID. Used to identify a unique database cluster | Optional | |
--host | Add the host for the Standby | Required | |
--port | Search for an available port starting from the current port as the Standby listening port, defaulting to 5432 |
Optional | |
plan | Generate deployment plan | ||
--init-file | Absolute path of the redirect file containing the output of the init command |
Required | |
setup | Execute deployment | ||
--plan-file | Absolute path of the file that redirects the output of the plan command |
Required | |
-r | Identifier parameter for deleting Standby nodes | Required |
Notes!
You need to perform the following complete Standby addition process.
Here is an example of the Standby node addition process. The details are as follows:
Collect machine information and some information about the deployed database.
$ mxinitstandby init --host <standby_hostname> > /tmp/mxinitstandby.init
Note!
Please replace<host>
with the corresponding host name.
Generate a deployment plan based on the collected information, i.e., the specific deployment steps.
$ mxinitstandby plan --init-file /tmp/mxinitstandby.init > /tmp/mxinitstandby.plan
Execute the deployment.
$ mxinitstandby setup --plan-file /tmp/mxinitstandby.plan --mode cli
Notes!
If you mistakenly execute themxinitstandby init
command on a user without sudo privileges, themxinitstandby.init
file will be generated under that user, and other users will only be able to read it but not write to it. You need to delete the generated file and re-execute the command on a user with sudo privileges to regenerate the file.
Notes!
You need to perform the following complete Standby deletion process.
Here is an example of the Standby node deletion process:
$ mxinitstandby -r init > /tmp/mxinitstandby_remove.init
$ mxinitstandby -r plan --init-file /tmp/mxinitstandby_remove.init > /tmp/mxinitstandby_remove.plan
$ mxinitstandby -r setup --plan-file /tmp/mxinitstandby_remove.plan
Notes!
Deleting the Standby node will automatically clean up the relevant configuration and data files.
The deletion operation will stop the Standby node service and remove the node from the cluster configuration.
Note!
Starting with YMatrix 5.X, a new database architecture has been deployed, enabling the mxinitstandby tool to manage Standby, which is incompatible with gpinitstandby. Previous versions can use the gpinitstandby tool.