2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 09:13:08 +00:00

Modify doc from victor's comments

This commit is contained in:
Casandra Qiu 2015-11-13 14:11:33 -05:00
parent 35606b5542
commit 98a55f1ea4
3 changed files with 39 additions and 31 deletions

View File

@ -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 <https://sourceforge.net/p/xcat/wiki/Setting_Up_MySQL_as_the_xCAT_DB/#configure-mysql-manually>`_

View File

@ -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

View File

@ -20,8 +20,8 @@ Start/Stop MySQL/MariaDB service
service mysql stop
Basic mysql commands
--------------------------------------
Basic MySQL/MariaDB commands
-----------------------------
Refer to `<https://www.mariadb.org/>`_ for the latest documentation.