3

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?

2 Answers 2

4

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/

-3

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.

2
  • So is it normal that these files are not on the mirror node?
    – Iván Jf
    May 9 at 22:43
  • They are there, but you will only see them once you mount the replicated DRBD device.
    – Dok
    May 10 at 4:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .