Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
cloudappliance/database-troubleshooting [2018_07_11 17:06] – [Starting the Database] steven | cloudappliance:database-troubleshooting [2024_01_12 18:16] – steven | ||
---|---|---|---|
Line 1: | Line 1: | ||
# Database Troubleshooting | # Database Troubleshooting | ||
+ | |||
+ | ##### last updated on: Feb 7, 2023 | ||
This document covers troubleshooting of the MariaDB database server included with the Enterprise File Fabric appliance. | This document covers troubleshooting of the MariaDB database server included with the Enterprise File Fabric appliance. | ||
Line 23: | Line 25: | ||
## Version Compatibility | ## Version Compatibility | ||
- | The Enterprise File Fabric appliance includes a MariaDB | + | The Enterprise File Fabric appliance includes a MariaDB |
Supported databases (as of Enterprise File Fabric 1705.00 through at least 1803.03) | Supported databases (as of Enterprise File Fabric 1705.00 through at least 1803.03) | ||
- | * MariaDB | + | * MariaDB 10.4 |
- | * MySQL 5.5, 5.6 | + | |
These compatible cloud database are supported. Please note versions. | These compatible cloud database are supported. Please note versions. | ||
- | * Amazon RDS for MySQL 5.5, 5.6 | + | * Amazon RDS for MariaDB 10.4 |
- | * Google Cloud SQL for MySQL 5.5, 5.6 | + | |
These cloud database versions are NOT supported: | These cloud database versions are NOT supported: | ||
- | * MariaDB 10.2 | ||
* MySQL 5.7 | * MySQL 5.7 | ||
* Amazon Aurora | * Amazon Aurora | ||
Line 161: | Line 160: | ||
We typically recommend tools from the hypervisor or third-parties to backup the appliance and database. In some cases it’s helpful to use native tools. | We typically recommend tools from the hypervisor or third-parties to backup the appliance and database. In some cases it’s helpful to use native tools. | ||
- | The File Fabric database is named < | + | The File Fabric database is named **smestorage** and stores data in of InnoDB and MyISAM tables. |
For more information see https:// | For more information see https:// | ||
Line 228: | Line 227: | ||
* Web File Manager (GUI) - Organization > Audit Logs > Clear Audit Logs (internally 500 at a time) | * Web File Manager (GUI) - Organization > Audit Logs > Clear Audit Logs (internally 500 at a time) | ||
- | * MySQL (be sure to pause mariadb via systemctl) | + | * MySQL (be sure to pause mariadb via systemctl)- Preserve Old Logs |
- | * RENAME TABLE us\_logs TO us\_logs\_date2018; CREATE TABLE us\_logs LIKE us_logs_date2018; | + | * RENAME TABLE or\_logs TO or\_logs\_date2021; CREATE TABLE or\_logs LIKE or\_logs\_date2021; |
- | * MySQL | + | * MySQL - Remove Old Logs |
- | * TRUNCATE | + | * TRUNCATE |
- | * **us_logs** - Login audit log. Can be cleared: | + | * **us\_logs** - Login audit log. Can be cleared: |
- | * MySQL (be sure to pause mariadb via systemctl) | + | * MySQL (be sure to pause mariadb via systemctl))- Preserve Old Logs |
- | * RENAME TABLE us\_logs TO us\_logs\_date2018; CREATE TABLE us\_logs LIKE us\_logs\_date2018; | + | * RENAME TABLE us\_logs TO us\_logs\_date2021; CREATE TABLE us\_logs LIKE us\_logs\_date2021; |
- | * MySQL | + | * MySQL - Remove Old Logs |
* TRUNCATE us\_logs; | * TRUNCATE us\_logs; | ||
Line 307: | Line 306: | ||
Remount | Remount | ||
- | mount var/ | + | mount -a |
+ | |||
Check new size | Check new size | ||
Line 323: | Line 322: | ||
mysqlcheck smestorage | mysqlcheck smestorage | ||
- | ## Repair | + | ## Repair |
- | From the command line run from the data folder: | + | From mysql shell run repair table on each corrupted table. |
+ | |||
+ | REPAIR TABLE tbl_name [, tbl_name] | ||
+ | |||
+ | You can also run for all MyISAM tables: | ||
cd / | cd / | ||
myisamchk --force --fast --update-state --key_buffer_size=48G --read_buffer_size=128K --write_buffer_size=128K --sort_buffer_size=48G *.MYI | myisamchk --force --fast --update-state --key_buffer_size=48G --read_buffer_size=128K --write_buffer_size=128K --sort_buffer_size=48G *.MYI | ||
+ | | ||
+ | See also: https:// | ||
+ | ## Convert to GTID for v2006+ | ||
+ | File Fabric HA/DR environments set up prior to v2006 did not leverage GTID for database replication. | ||
+ | Starting with v2006 and greater, GTID is the recommended method for data migration. | ||
+ | |||
+ | <WRAP center round important 100%> | ||
+ | Warning: This work will bring down the File Fabric. As such you should run this only during a planned maintenance window. | ||
+ | </ | ||
+ | |||
+ | ### Enable GTID in the File Fabric appliances: | ||
+ | |||
+ | As the root user run the following on every database node: | ||
+ | < | ||
+ | echo " | ||
+ | | ||
+ | </ | ||
+ | |||
+ | ### Change replication to GTID Based | ||
+ | Please use this only if you currently have replication running and both nodes are currently in sync. | ||
+ | |||
+ | On both nodes (secondary first than primary), in the ' | ||
+ | |||
+ | < | ||
+ | STOP SLAVE; | ||
+ | CHANGE MASTER TO MASTER_HOST=< | ||
+ | START SLAVE; | ||
+ | </ | ||
+ | |||
+ | ### Reseed using GTID Based Replication | ||
+ | |||
+ | Once you have made the configuration change above and restarted MariaDB, you can proceed with reseeding the databases and re-enabling replication. | ||
+ |