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 describes the steps to uninstall and reinstall YMatrix 5 in clusters. Taking three nodes as an example, the main node is mdw, and the two data nodes are sdw1 and sdw2 respectively.
Before performing the operation, be sure to read this prompt carefully:
Notes!
- 2 The parts in the serial number are independent of each other. Just select one of them according to the above prompts, and do not execute them all!
First, you need to be prepared before uninstalling or reinstalling. This step is necessary, otherwise it will hinder the uninstall operation. Exit the terminal opened by psql through the meta command \q
.
postgres=# \q
Use the mxdeletesystem
command on Master to delete the database instance and data.
$ mxdeletesystem -a
Notes!
The commands that appear in this article are based on the CentOS 7 operating system. If you are using a CentOS 8 operating system, you need to replace the yum command in this step with dnf; if you are using an Ubuntu system, you need to replace the yum command in this step with apt.
First, you need to query the installed program name of the cluster through the following command:
[<用户名称>@mdw ~]$ yum list installed | grep matrixdb
matrixdb5.x86_64 5.0.0+enterprise~beta.5-1.el7 installed
Notes!
Ubuntu20.04 requiressudo apt list --installed | grep matrixdb
to query the program name after the cluster is installed.
Then uninstall the program. This step will completely uninstall the YMatrix software, which needs to be run with sudo permissions or root users under normal users, on all nodes.
[<用户名称>@mdw ~]$ sudo yum remove -y matrixdb5.x86_64
#or
[<用户名称>@mdw ~]$ sudo yum erase -y matrixdb5.x86_64
If you use this part, you can rest assured that if you uninstall and reinstall the higher version or the same version in the YMatrix 5 major version, you will not lose cluster data. For example, YMatrix 5.5 upgrades to YMatrix 5.6; uninstalls YMatrix 5.5 and reinstalls YMatrix 5.5.
You need to stop the cluster first and prepare for uninstalling or reinstalling. This step is necessary, otherwise it will hinder the uninstall operation.
Exit the terminal opened by psql through the meta command \q
.
postgres=# \q
In the example, you can use the fast
mode to stop the cluster process, and if you need it, you can also choose smart
or immediate
mode to stop the cluster. The table below illustrates their differences.
[mxadmin@mdw ~]$ mxstop -a -M fast
mxstop mode | parameters | disable new connection | wait for the process to run | Is it the default mode |
---|---|---|---|---|
smart | -M smart | Yes | Yes | |
fast | -M fast | Yes | No, interrupted connection, transaction rollback | No |
immediate | -M immediate | Yes | No, kill the process directly | No |
You need to perform the "1.2 YMatrix Uninstall" above. This step will completely uninstall the original version of YMatrix software.
Notes!
If you are using a CentOS 8 operating system, you need to replace yum in this step with dnf; if you are using an Ubuntu system, you need to replace the yum command in this step with apt.
Reinstall the RPM package you need. This operation is performed under normal users.
[<用户名称>@mdw ~]$ sudo yum install -y matrixdb-5.0.0+community-1.el7.x86_64.rpm
After the cluster is initialized, go back to the command line and use sudo permissions to connect to the mxadmin user.
[<用户名称>@mdw ~]$ sudo su - mxadmin
Then, use the mxstart tool to start the cluster.
[mxadmin@mdw ~]$ mxstart -a
After the cluster is successfully started, the graphic interface can also be used normally.