Manually Initialize DB

When Using rbd-db

Kato installs the specified database by default and runs in the rbd-db container. When the user needs to manually initialize the database, it needs to be executed on the first management node:

systemctl stop node
systemctl stop rbd-db 
rm -rf /opt/kato/data/mysql/
systemctl start node
/opt/kato/.init/updatedb.sh prepare
/opt/kato/.init/updatedb.sh migrate
/opt/kato/.init/updatedb.sh config

When Using an External Database

Kato provides a way to specify an external database to store cluster metadata. When you need to manually initialize the database, you need to execute in an external database:

  • Manually delete the console and region databases in the external database

  • Execute on the first management node:

/opt/kato/.init/updatedb.sh prepare
/opt/kato/.init/updatedb.sh migrate
/opt/kato/.init/updatedb.sh config