Score:3

There is no replication in a HA Cluster

US flag

I had the problem of unrelated data aborting in a HA cluster and my Mysql resource was in standalone on both nodes, I managed to solve the problem and both nodes are synchronized, the problem now is that when checking the var/lib/mysql directory

On the main node I have the following files:

-database
-innodbdata
-innodblog
-lost+found
-mysql.sock
-replicationlog
-tmp
-trace

but the mirror node I only have the clsstd2.err file that contains the following:

1.mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql/usr/sbin/mysqld: Table ‘mysql.plugin’ doesn’t exist.
2.[ERROR] Can’t open the mysql.plugin table. Please run mysql_upgrade to create it.
3.InnoBD: operating system error number 13 in a file operation.
4.InnoBD: The error means mysqld does not have access rights to the directory.
5.InnoBD: File name ./ibdata1
6.InnoBD: File operation call: ‘create’
7.InnoBD: Cannot continue operation
8.mysqld_safe mysqld from pid file /var/lib/mysql/clsstd2.pid ended.

How can I create these files on the mirror node to ensure replication?

Score:4
cn flag

Only one server will work with a data set at a time, while keeping the other server as a backup with realtime data updates. See:

https://syslint.com/blog/tutorial/drbd-%E2%80%93-heartbeat-activepassive-high-availability-cluster

If you want to access your data from your both cluster nodes you have to utilize an active-active block-level replication with a clustered file system on top. You might want to look into using SDS solutions like StarWind Virtual SAN (vSAN) and cluster-aware file system like f.e. Red Hat GFS2. See:

https://www.starwindsoftware.com/starwind-virtual-san

https://www.golinuxcloud.com/configure-gfs2-setup-cluster-linux-rhel-centos-7/

Score:-3
jm flag
Dok

DRBD operates in an active-passive manner. The data will only be present where the DRBD volume is mounted (e.g. the current Primary node). To test and verify the files and functionality of the secondary node you will need to failover to that node and mount the DRBD device at /var/lib/mysql.

Iván Jf avatar
md
So is it normal that these files are not on the mirror node?
jm flag
Dok
They are there, but you will only see them once you mount the replicated DRBD device.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.