Problèmes MariaDB

Réplication cassée suite à un disk full

Erreur :

 Last_Error: Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MariaDB code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave.

Récupérer les infos suivantes :

Relay_Master_Log_File: mysql-bin.000709
Exec_Master_Log_Pos: 391386998
Relay_Log_File: mysqld-relay-bin.000616

Sur le Master, vérifier le fichier mysql-bin.000709 :

mariadb-binlog /data/mysql/mysql-bin.000709
[...]
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;

Sur le Slave, vérifier le fichier mysqld-relay-bin.000616 :

mariadb-binlog /data/mysql/mysqld-relay-bin.000616
[...]
ERROR: Error in Log_event::read_log_event(): 'Event truncated', data_len: 732, event_type: 2
ERROR: Could not read entry at offset 387284531: Error in log format or read error.

Le fichier mysqld-relay-bin.000616 est corrompu, il faut relancer la récupération du binlog sur le Slave :

MariaDB [(none)]> STOP SLAVE;
Query OK, 0 rows affected (0.003 sec)

MariaDB [(none)]> RESET SLAVE;
Query OK, 0 rows affected, 1 warning (0.297 sec)

MariaDB [(none)]> CHANGE MASTER TO MASTER_SSL=1, MASTER_SSL_VERIFY_SERVER_CERT=0, MASTER_HOST='ov101.bdd',MASTER_USER='replication_user',MASTER_PASSWORD='XXXXXxxxxxXXXXX',  MASTER_PORT=3307, MASTER_LOG_FILE='mysql-bin.000709', MASTER_LOG_POS=391386998;
Query OK, 0 rows affected, 1 warning (0.004 sec)

MariaDB [(none)]> START SLAVE;
Query OK, 0 rows affected (0.001 sec)