Emergency S3 Data Reset Procedure
This document outlines emergency recovery workflows for cases where local metadata becomes terminally out of sync with S3 storage or when cluster master and DBroot ownership configurations become corrupted.
1. Resetting ColumnStore S3 Storage Data
In some scenarios, you may need to completely reset your database data by deleting all contents within your S3 bucket. This procedure clears local caches, wipes the bucket, and resets the MariaDB server databases.
Shutdown ColumnStore Stop the ColumnStore cluster:
mcsShutdownRemove On-Disk Caches & Metadata On each node in the cluster, remove the local caches and metadata that act as pointers to the S3 bucket. If your cluster uses a shared
/var/lib/columnstore/storagemanager/directory for high availability (HA), you may only need to run these commands once:
rm -rf /var/lib/columnstore/storagemanager/cache
rm -rf /var/lib/columnstore/storagemanager/metadata
rm -rf /var/lib/columnstore/storagemanager/journalDelete Everything from the S3 Bucket Depending on your access, delete all contents within the bucket. This can often be done via a GUI, or using the AWS CLI:
aws s3 sync . s3://bucket-name --deleteStart ColumnStore Bring the cluster back online:
mcsStartClean Up MariaDB Databases Delete the relevant databases or ColumnStore tables from the MariaDB server.
mariadb
SHOW DATABASES;
DROP DATABASE test;Validate Table Creation Confirm the reset was successful by creating a new test database and table:
2. Fixing Mixed DBroot Ownership and Master Node Issues
If node DBroot ownership becomes mixed (e.g., node 2 owns DBroot 4 but its data4 directory has no data), or if the master node shifts unexpectedly, users may encounter ERROR 1815 (HY000): Internal error: IDB-2039. Use one of the following methods to reset the cluster configuration.
Method A: Restoration via Columnstore.xml.restore
Note: This method requires approximately 30 minutes of downtime and relies on having a Columnstore.xml.restore file created during the initial cluster setup.
Set Maintenance Mode: Put replica servers into maintenance mode via MaxScale.
Shutdown Cluster: Run `mcsShutdown` on the master node.
Stop Services: On each node (starting with replicas), stop the services and clear shared memory.
Kill Zombie Processes: Ensure no ColumnStore processes remain active.
Backup DBRM: On the master node, back up the DBRM files.
Restore Configuration: On each node, back up the current XML and restore the original.
Restart Services: On each node (starting with the master), clear shared memory and restart services.
Start Cluster: Run
mcsStarton the master and wait 30 seconds. Verify cluster health usingmcsStatus.Clear Maintenance Mode: Remove the MaxScale maintenance blocks.
Method B: Manual Cluster Reset
Gather IPs and Backup: Run
ifconfigto note all server IP addresses[cite: 4]. Copy/etc/columnstore/Columnstore.xmlto/etc/columnstore/Columnstore.xml.beforeResetBackupon all nodes[cite: 4].Prepare Master and MaxScale: Put replicas in maintenance mode via
maxctrl[cite: 4]. On the master, note your CMAPI key from/etc/columnstore/cmapi_server.conf, runmcsShutdown, and back up your DBRM files[cite: 4].Declusterize Nodes: On each node, stop MariaDB and CMAPI[cite: 4]. Copy the default XML to reset the node[cite: 4].
Rebuild Cluster: On the master node, add the nodes back in the exact order of desired DBroot ownership (starting with the master as DBroot 1).
Restore Customizations: Compare your
Columnstore.xml.beforeResetBackupwith the new configuration and reapply customizations usingmcsSetConfig.Finalize: Save the working configuration as
Columnstore.xml.restore, bounce the cluster (mcsShutdownfollowed bymcsStart), and clear MaxScale maintenance mode.
This page is: Copyright © 2026 MariaDB. All rights reserved.
Last updated
Was this helpful?

