Changing the Default Data Directory Post Installation for a Leaf Node
On this page
You can configure a custom location for the data directory on a node.
-
moving the data directory to a bigger file system directory.
-
restructuring the directories as part of a clean-up process.
In a High Availability Setup
In an HA setup, you can perform the procedure by just stopping one leaf node at a time.
1.MEMSQL_
s:
sdb-admin list-nodes
2.
sdb-admin describe-node --memsql-id <MEMSQL_ID> --property datadir
3.
4.
sdb-admin stop-node --memsql-id <MEMSQL_ID>
5.
sudo mv <source_data_directory> <new_data_directory_path>
6.
sdb-admin update-config --key datadir --value <new_data_directory_path> --memsql-id <MEMSQL_ID>
7.
sdb-admin describe-node --memsql-id <MEMSQL_ID>
8: Restart the leaf node by executing:
sdb-admin start-node --memsql-id <MEMSQL_ID>
9: Verify the status of the leaf node:
sdb-admin list-nodes
In a Non-High Availability Setup
In a non-HA setup, stop all the nodes before performing the following procedure.
1.MEMSQL_
s:
sdb-admin list-nodes
2.
sdb-admin describe-node --memsql-id <MEMSQL_ID> --property datadir
3.
4.
sdb-admin stop-node --all
5.
sudo mv <source_data_directory> <new_data_directory_path>
6.
sdb-admin update-config --key datadir --value <new_data_directory_path> --memsql-id <MEMSQL_ID>
7.
sdb-admin describe-node --memsql-id <MEMSQL_ID>
8.
9.
sdb-admin start-node --all
10.
sdb-admin list-nodes
Last modified: April 26, 2023