From 98a55f1ea4a73928ce5210059c0ce7b76125b34d Mon Sep 17 00:00:00 2001 From: Casandra Qiu Date: Fri, 13 Nov 2015 14:11:33 -0500 Subject: [PATCH] Modify doc from victor's comments --- .../databases/mysql_configure.rst | 12 +++-- .../large_clusters/databases/mysql_remove.rst | 54 ++++++++++--------- .../large_clusters/databases/mysql_using.rst | 4 +- 3 files changed, 39 insertions(+), 31 deletions(-) diff --git a/docs/source/guides/admin-guides/large_clusters/databases/mysql_configure.rst b/docs/source/guides/admin-guides/large_clusters/databases/mysql_configure.rst index 5278a47b3..ed0ff7271 100644 --- a/docs/source/guides/admin-guides/large_clusters/databases/mysql_configure.rst +++ b/docs/source/guides/admin-guides/large_clusters/databases/mysql_configure.rst @@ -11,11 +11,15 @@ The following utility is provided to migrate an existing xCAT database from SQLi If you need to update the database at a later time to give access to your service nodes, you can use the ``mysqlsetup -u -f`` command. A file needs to be provided with all the hostnames and/or IP addresses of the servers that need to access the database on the Management node. Wildcards can be used. :: - cat /path/to/file1 - service1 - 10.1.1.1 + mysqlsetup -u -f /tmp/servicenodes - mysqlsetup -u -f /path/to/file1 +where the /tmp/servicenodes contains a host per line: :: + + cat /tmp/servicenodes + node1 + 1.115.85.2 + 10.%.%.% + node2.cluster.net **While not recommended**, if you wish to manually migrate your xCAT database, see the following documentation: `Manually set up MySQL `_ diff --git a/docs/source/guides/admin-guides/large_clusters/databases/mysql_remove.rst b/docs/source/guides/admin-guides/large_clusters/databases/mysql_remove.rst index e7f5e2f9e..73c5b07fe 100644 --- a/docs/source/guides/admin-guides/large_clusters/databases/mysql_remove.rst +++ b/docs/source/guides/admin-guides/large_clusters/databases/mysql_remove.rst @@ -1,39 +1,43 @@ Removing ``xcatdb`` from MySQL/MariaDB ====================================== -To remove ``xcatdb`` completely from the MySQL/MariaDB database: +For some reason, if you do not want to use MySQL/MariaDB to maintain ``xcatdb``, and like to switch to PostgreSQL or just default SQLite ( **Note:** SQLite does not support xCAT Hierarchy (has service nodes)), you can always to do that with the xCAT command. -#. Run a backup of the database to save any information that is needed: :: +* Run a backup of the database to save any information that is needed (optional): :: mkdir -p ~/xcat-dbback dumpxCATdb -p ~/xcat-dbback -#. Stop the ``xcatd`` daemon on the management node. - **Note:** If you are using *xCAT Hierarchy (service nodes)* and removing ``xcatdb`` from MySQL/MariaDB, hierarchy will no longer work. You will need to configure another database which supports remote database access to continue using the hierarchy feature. :: - - service xcatd stop - -#. Remove the ``xatdb`` from MySQL/MariaDB: :: - - /usr/bin/mysql -u root -p - - drop the xcatdb: :: - - mysql> drop database xcatdb; - - remove the xcatadm database owner : :: - - mysql> drop user xcatadm; - -#. Move, or remove, the ``/etc/xcat/cfglog`` file as it points xCAT to MySQL/MariaDB. (without this file, xCAT defaults to SQLite): :: - - mv /etc/xcat/cfgloc /etc/xcat/cfglog.mysql - -#. Restore the MySQL/MariaDB database into SQLite: :: + If you want to restore this database: :: XCATBYPASS=1 restorexCATdb -p ~/xcat-dbback -#. Restart ``xcatd``: :: +* Change to PostgrSQL, please follow link https://xcat-docs.readthedocs.org/en/latest/guides/admin-guides/large_clusters/databases/postgres_install.html + + +* Change to default SQLite (**Note**: xCAT Hierarchy cluster will no longer work) + + #. Stop the ``xcatd`` daemon on the management node. :: + + service xcatd stop + + #. Remove the ``xatdb`` from MySQL/MariaDB (optional): :: + + /usr/bin/mysql -u root -p + + drop the xcatdb: :: + + mysql> drop database xcatdb; + + remove the xcatadm database owner : :: + + mysql> drop user xcatadm; + + #. Move, or remove, the ``/etc/xcat/cfglog`` file as it points xCAT to MySQL/MariaDB. (without this file, xCAT defaults to SQLite): :: + + rm /etc/xcat/cfgloc + + #. Restart ``xcatd``: :: service xcatd start diff --git a/docs/source/guides/admin-guides/large_clusters/databases/mysql_using.rst b/docs/source/guides/admin-guides/large_clusters/databases/mysql_using.rst index 75b498718..430a7d609 100644 --- a/docs/source/guides/admin-guides/large_clusters/databases/mysql_using.rst +++ b/docs/source/guides/admin-guides/large_clusters/databases/mysql_using.rst @@ -20,8 +20,8 @@ Start/Stop MySQL/MariaDB service service mysql stop -Basic mysql commands --------------------------------------- +Basic MySQL/MariaDB commands +----------------------------- Refer to ``_ for the latest documentation.