mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-29 17:23:08 +00:00
Update pgsqlsetup command and related docs
This commit is contained in:
parent
00d507674d
commit
5096a73760
@ -1,7 +1,9 @@
|
||||
Removing ``xcatdb`` from PostgreSQL
|
||||
===================================
|
||||
Removing ``xcatdb`` from PostgreSQL and restoring data into SQLite
|
||||
==================================================================
|
||||
|
||||
To remove ``xcatdb`` completely from the PostgreSQL database:
|
||||
.. note. If you are using *xCAT Hierarchy (service nodes)* and removing ``xcatdb`` from postgres, hierarchy will no longer work. You will need to configure another database which supports remote database access to continue using the hierarchy feature. ::
|
||||
|
||||
To remove ``xcatdb`` completely from the PostgreSQL database and restore xCAT data into SQLite:
|
||||
|
||||
#. Run a backup of the database to save any information that is needed: ::
|
||||
|
||||
@ -9,7 +11,6 @@ To remove ``xcatdb`` completely from the PostgreSQL database:
|
||||
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 postgres, 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
|
||||
|
||||
@ -29,6 +30,7 @@ To remove ``xcatdb`` completely from the PostgreSQL database:
|
||||
|
||||
cd /var/lib/pgsql/data
|
||||
rm -rf *
|
||||
exit
|
||||
|
||||
#. Move, or remove, the ``/etc/xcat/cfglog`` file as it points xCAT to PostgreSQL. (without this file, xCAT defaults to SQLite): ::
|
||||
|
||||
|
@ -33,8 +33,8 @@ DESCRIPTION
|
||||
***********
|
||||
|
||||
|
||||
\ **pgsqlsetup**\ - Sets up the PostgreSQL database for xCAT to use. The pgsqlsetup script is run on the Management Node as root after the PostgreSQL code has been installed. The xcatd daemon will be stopped during migration. No xCAT commands should be run during the init process, because we will be migrating the xCAT database to PostgreSQL and restarting the xcatd daemon as well as the PostgreSQL daemon. For full information on all the steps that will be done reference
|
||||
One password must be supplied for the setup, a password for the xcatadm unix id and the same password for the xcatadm database id. The password will be prompted for interactively or you can set the XCATPGPW environment variable to the password and then there will be no prompt.
|
||||
\ **pgsqlsetup**\ - Sets up the PostgreSQL database for xCAT to use. The \ **pgsqlsetup**\ script is run on the Management Node as root after the PostgreSQL has been installed. The \ **xcatd**\ daemon will be stopped during migration. No xCAT commands should be run during the init process, because we will be migrating the xCAT database to PostgreSQL and restarting the \ **xcatd**\ daemon as well as the PostgreSQL daemon.
|
||||
One password must be supplied for the setup, a password for the xcatadm unix id and the same password for the xcatadm database id. The password will be prompted for interactively or you can set the XCATPGPW environment variable to the password in order to avoid the prompt.
|
||||
|
||||
|
||||
*******
|
||||
@ -63,17 +63,17 @@ OPTIONS
|
||||
|
||||
\ **-i|-**\ **-init**\
|
||||
|
||||
The init option is used to setup an installed PostgreSQL database so that xCAT can use the database. This involves creating the xcat database, the xcat admin id, allowing access to the xcatdb database by the Management Node. It customizes the postgresql.conf configuration file, adds the management server to the pg_hba.conf and starts the PostgreSQL server. It also backs up the current xCAT database and restores it into the newly setup xcatdb PostgreSQL database. It creates the /etc/xcat/cfgloc file to point the xcatd daemon to the PostgreSQL database and restarts the xcatd daemon using the database.
|
||||
On AIX, it additionally setup the xcatadm unix id and the postgres id and group. For AIX, you should be using the PostgreSQL rpms available from the xCAT website. For Linux, you should use the PostgreSQL rpms shipped with the OS. You can chose the -o option, to run after the init.
|
||||
To add additional nodes to access the PostgreSQL server, setup on the Management Node, use the -a option.
|
||||
The \ **-**\ **-init**\ option is used to setup an installed PostgreSQL database so that xCAT can use it. This involves creating the xcat database, the xcat admin id, allowing access to the xcatdb database by the Management Node. It customizes the postgresql.conf configuration file, adds the management server to the pg_hba.conf and starts the PostgreSQL server. It also backs up the current xCAT database and restores it into the newly setup xcatdb PostgreSQL database. It creates the /etc/xcat/cfgloc file to point the \ **xcatd**\ daemon to the PostgreSQL database and restarts the \ **xcatd**\ daemon using the database.
|
||||
On AIX, it additionally setup the xcatadm unix id and the postgres id and group. For AIX, you should be using the PostgreSQL rpms available from the xCAT website. For Linux, you should use the PostgreSQL rpms shipped with the OS. You can chose the \ **-o**\ option, to run after the init.
|
||||
To add additional nodes to access the PostgreSQL server, setup on the Management Node, use the \ **-a**\ option.
|
||||
|
||||
For more documentation see:Setting_Up_PostgreSQL_as_the_xCAT_DB
|
||||
For more documentation see:<https://xcat-docs.readthedocs.io/en/stable/advanced/hierarchy/databases/index.html#postgresql>
|
||||
|
||||
|
||||
|
||||
\ **-N|-**\ **-nostart**\
|
||||
|
||||
This option with the -i flag will create the database, but will not backup and restore xCAT tables into the database. It will create the cfgloc file such that the next start of xcatd will try and contact the database. This can be used to setup the xCAT PostgreSQL database during or before install.
|
||||
This option with the \ **-i**\ flag will create the database, but will not backup and restore xCAT tables into the database. It will create the cfgloc file such that the next start of \ **xcatd**\ will try and contact the database. This can be used to setup the xCAT PostgreSQL database during or before install.
|
||||
|
||||
|
||||
|
||||
|
@ -318,7 +318,7 @@ if (($INIT) && ($xcatrunningpgsql == 0))
|
||||
# if that does not exist use resolved hostname
|
||||
# double check site.master for resolution
|
||||
my $sitefile = "$::backupdir/site.csv";
|
||||
my $cmd = "grep master $sitefile";
|
||||
my $cmd = "grep \"master $sitefile";
|
||||
my @output = xCAT::Utils->runcmd($cmd, -1);
|
||||
if ($::RUNCMD_RC == 0) # entry in site table
|
||||
{
|
||||
|
@ -15,8 +15,8 @@ B<pgsqlsetup> {B<-o> | B<--setupODBC>} [B<-V> | B<--verbose>]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
B<pgsqlsetup> - Sets up the PostgreSQL database for xCAT to use. The pgsqlsetup script is run on the Management Node as root after the PostgreSQL code has been installed. The xcatd daemon will be stopped during migration. No xCAT commands should be run during the init process, because we will be migrating the xCAT database to PostgreSQL and restarting the xcatd daemon as well as the PostgreSQL daemon. For full information on all the steps that will be done reference
|
||||
One password must be supplied for the setup, a password for the xcatadm unix id and the same password for the xcatadm database id. The password will be prompted for interactively or you can set the XCATPGPW environment variable to the password and then there will be no prompt.
|
||||
B<pgsqlsetup> - Sets up the PostgreSQL database for xCAT to use. The B<pgsqlsetup> script is run on the Management Node as root after the PostgreSQL has been installed. The B<xcatd> daemon will be stopped during migration. No xCAT commands should be run during the init process, because we will be migrating the xCAT database to PostgreSQL and restarting the B<xcatd> daemon as well as the PostgreSQL daemon.
|
||||
One password must be supplied for the setup, a password for the xcatadm unix id and the same password for the xcatadm database id. The password will be prompted for interactively or you can set the XCATPGPW environment variable to the password in order to avoid the prompt.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
@ -36,15 +36,15 @@ Displays verbose messages.
|
||||
|
||||
=item B<-i|--init>
|
||||
|
||||
The init option is used to setup an installed PostgreSQL database so that xCAT can use the database. This involves creating the xcat database, the xcat admin id, allowing access to the xcatdb database by the Management Node. It customizes the postgresql.conf configuration file, adds the management server to the pg_hba.conf and starts the PostgreSQL server. It also backs up the current xCAT database and restores it into the newly setup xcatdb PostgreSQL database. It creates the /etc/xcat/cfgloc file to point the xcatd daemon to the PostgreSQL database and restarts the xcatd daemon using the database.
|
||||
On AIX, it additionally setup the xcatadm unix id and the postgres id and group. For AIX, you should be using the PostgreSQL rpms available from the xCAT website. For Linux, you should use the PostgreSQL rpms shipped with the OS. You can chose the -o option, to run after the init.
|
||||
To add additional nodes to access the PostgreSQL server, setup on the Management Node, use the -a option.
|
||||
The B<--init> option is used to setup an installed PostgreSQL database so that xCAT can use it. This involves creating the xcat database, the xcat admin id, allowing access to the xcatdb database by the Management Node. It customizes the postgresql.conf configuration file, adds the management server to the pg_hba.conf and starts the PostgreSQL server. It also backs up the current xCAT database and restores it into the newly setup xcatdb PostgreSQL database. It creates the /etc/xcat/cfgloc file to point the B<xcatd> daemon to the PostgreSQL database and restarts the B<xcatd> daemon using the database.
|
||||
On AIX, it additionally setup the xcatadm unix id and the postgres id and group. For AIX, you should be using the PostgreSQL rpms available from the xCAT website. For Linux, you should use the PostgreSQL rpms shipped with the OS. You can chose the B<-o> option, to run after the init.
|
||||
To add additional nodes to access the PostgreSQL server, setup on the Management Node, use the B<-a> option.
|
||||
|
||||
For more documentation see:Setting_Up_PostgreSQL_as_the_xCAT_DB
|
||||
For more documentation see:<https://xcat-docs.readthedocs.io/en/stable/advanced/hierarchy/databases/index.html#postgresql>
|
||||
|
||||
=item B<-N|--nostart>
|
||||
|
||||
This option with the -i flag will create the database, but will not backup and restore xCAT tables into the database. It will create the cfgloc file such that the next start of xcatd will try and contact the database. This can be used to setup the xCAT PostgreSQL database during or before install.
|
||||
This option with the B<-i> flag will create the database, but will not backup and restore xCAT tables into the database. It will create the cfgloc file such that the next start of B<xcatd> will try and contact the database. This can be used to setup the xCAT PostgreSQL database during or before install.
|
||||
|
||||
=item B<-l|--listen> I<address>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user