GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
OCF_HEARTBEAT_MARIAD(7) OCF resource agents OCF_HEARTBEAT_MARIAD(7)

ocf_heartbeat_mariadb - Manages a MariaDB master/slave instance

mariadb [start | stop | status | monitor | promote | demote | meta-data | validate-all]

Resource script for MariaDB.

Manages a complete master/slave replication setup with GTID, for simpler uses look at the mysql resource agent which supports older replication forms which mysql and mariadb have in common.

The resource must be setup to use notifications. Set 'notify=true' in the metadata attributes when defining a MariaDB master/slave instance.

The default behavior is to use uname -n values in the change master to command. Other IPs can be specified manually by adding a node attribute ${INSTANCE_ATTR_NAME}_mysql_master_IP giving the IP to use for replication. For example, if the mariadb primitive you are using is p_mariadb, the attribute to set will be p_mariadb_mysql_master_IP.

binary
Location of the MariaDB server binary

(optional, string, default "/usr/bin/safe_mysqld")

client_binary

Location of the MariaDB client binary

(optional, string, default "mysql")

config

Configuration file

(optional, string, default "/etc/my.cnf")

datadir

Directory containing databases

(optional, string, default "/var/lib/mysql")

user

User running MariaDB daemon

(optional, string, default "mysql")

group

Group running MariaDB daemon (for logfile and directory permissions)

(optional, string, default "mysql")

log

The logfile to be used for mysqld.

(optional, string, default "/var/log/mysqld.log")

node_list

All node names of nodes that will execute mariadb. Please separate each node name with a space. This is required for the master selection to function.

(required, string, no default)

pid

The pidfile to be used for mysqld.

(optional, string, default "/var/run/mysql/mysqld.pid")

socket

The socket to be used for mysqld.

(optional, string, default "/var/lib/mysql/mysql.sock")

test_table

Table to be tested in monitor statement (in database.table notation)

(optional, string, default "mysql.user")

test_user

MariaDB test user, must have select privilege on test_table

(optional, string, default "root")

test_passwd

MariaDB test user password

(optional, string, no default)

enable_creation

If the MariaDB database does not exist, it will be created

(optional, boolean, default 0)

additional_parameters

Additional parameters which are passed to the mysqld on startup. (e.g. --skip-external-locking or --skip-grant-tables)

(optional, string, no default)

replication_user

MariaDB replication user. This user is used for starting and stopping MariaDB replication, for setting and resetting the master host, and for setting and unsetting read-only mode. Because of that, this user must have SUPER, REPLICATION SLAVE, REPLICATION CLIENT, PROCESS and RELOAD privileges on all nodes within the cluster. Mandatory if you define a master-slave resource.

(optional, string, default "root")

replication_passwd

MariaDB replication password. Used for replication client and slave. Mandatory if you define a master-slave resource.

(optional, string, no default)

replication_port

The port on which the Master MariaDB instance is listening.

(optional, string, default "3306")

This resource agent supports the following actions (operations):

start

Starts the resource. Suggested minimum timeout: 120s.

stop

Stops the resource. Suggested minimum timeout: 120s.

status

Performs a status check. Suggested minimum timeout: 60s.

monitor

Performs a detailed status check. Suggested minimum timeout: 30s. Suggested interval: 20s.

monitor (Master role)

Performs a detailed status check. Suggested minimum timeout: 30s. Suggested interval: 10s.

monitor (Slave role)

Performs a detailed status check. Suggested minimum timeout: 30s. Suggested interval: 30s.

promote

Promotes the resource to the Master role. Suggested minimum timeout: 120s.

demote

Demotes the resource to the Slave role. Suggested minimum timeout: 120s.

notify

Suggested minimum timeout: 90s.

validate-all

Performs a validation of the resource configuration. Suggested minimum timeout: 5s.

meta-data

Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5s.

The following is an example configuration for a mariadb resource using the crm(8) shell:

primitive p_mariadb ocf:heartbeat:mariadb \
  params \
    node_list=string \
  op monitor depth="0" timeout="30s" interval="20s" \
  op monitor role="Master" depth="0" timeout="30s" interval="10s" \
  op monitor role="Slave" depth="0" timeout="30s" interval="30s" 

ms ms_mariadb p_mariadb \
  meta notify="true" interleave="true"

The following is an example configuration for a mariadb resource using pcs(8)

pcs resource create p_mariadb ocf:heartbeat:mariadb \
  node_list=string \
  op monitor OCF_CHECK_LEVEL="0" timeout="30s" interval="20s" \
  op monitor role="Master" OCF_CHECK_LEVEL="0" timeout="30s" interval="10s" \
  op monitor role="Slave" OCF_CHECK_LEVEL="0" timeout="30s" interval="30s" promotable

http://clusterlabs.org/

ClusterLabs contributors (see the resource agent source for information about individual authors)
04/12/2022 resource-agents 4.10.0

Search for    or go to Top of page |  Section 7 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.