Extent Map Backup & Recovery

You are viewing an old version of this article. View the current version here.

ColumnStore 1.4 and above uses an extent map file located at /var/lib/columnstore/data1/systemFiles/dbrm/BRM_saves_em.

If this file were to become corrupted or if your system were to crash before the current runtime information were flushed to disk, your system could become unusable and data loss could occur.

The ColumnStore team currently has two projects under development to address this. One will address the crash proofing of this file and the other will allow for extent recreation via a new utility.

In the interim, we recommend that users of ColumnStore follow the following procedures to allow a quick recovery from such an outage.

BACKUP OF NODE 1

  • $ mariadb -e "FLUSH TABLES WITH READ LOCK;"
  • $ save_brm
  • $ mkdir -p /extent_map_backup
  • $ cp -f /var/lib/columnstore/data1/systemFiles/dbrm/BRM_saves_em /extent_map_backup
  • $ mariadb -e "UNLOCK TABLES;"

RECOVERY FOR SINGLE NODE SYSTEM

  • $ systemctl stop mariadb-columnstore
  • $ mv /var/lib/columnstore/data1/systemFiles/dbrm/BRM_saves_em /tmp/BRM_saves_em.bad
  • $ cat /dev/null > /var/lib/columnstore/data1/systemFiles/dbrm/BRM_saves_vbbm
  • $ cat /dev/null > /var/lib/columnstore/data1/systemFiles/dbrm/BRM_saves_vss
  • $ cp -f /extent_map_backup/BRM_saves_em /var/lib/columnstore/data1/systemFiles/dbrm/
  • $ chown -R mysql:mysql /var/lib/columnstore/data1/systemFiles/dbrm/
  • $ systemctl start mariadb-columnstore

RECOVERY FOR CLUSTER SYSTEM

  • $ curl -s -X PUT https://127.0.0.1:8640/cmapi/0.4.0/cluster/shutdown --header 'Content-Type:application/json' --header 'x-api-key:somekey123' --data '{"timeout":60}' -k | jq .
  • $ mv /var/lib/columnstore/data1/systemFiles/dbrm/BRM_saves_em /tmp/BRM_saves_em.bad
  • $ cat /dev/null > /var/lib/columnstore/data1/systemFiles/dbrm/BRM_saves_vbbm
  • $ cat /dev/null > /var/lib/columnstore/data1/systemFiles/dbrm/BRM_saves_vss
  • $ cp -f /extent_map_backup/BRM_saves_em /var/lib/columnstore/data1/systemFiles/dbrm/
  • $ chown -R mysql:mysql /var/lib/columnstore/data1/systemFiles/dbrm/
  • $ curl -s -X PUT https://127.0.0.1:8640/cmapi/0.4.0/cluster/start --header 'Content-Type:application/json' --header 'x-api-key:somekey123' --data '{"timeout":60}' -k | jq .

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.