Removing xcatdb from PostgreSQLΒΆ

To remove xcatdb completely from the PostgreSQL database:

  1. Run a backup of the database to save any information that is needed:

    mkdir -p ~/xcat-dbback
    dumpxCATdb -p ~/xcat-dbback
    
  2. 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
    
  3. Remove the xatdb from PostgreSQL:

    su - postgres
    

    drop the xcatdb:

    dropdb xcatdb
    

    remove the xcatadm database owner :

    dropuser xcatadm
    

    clean up the postgresql files (necessary if you want to re-create the database):

    cd /var/lib/pgsql/data
    rm -rf *
    
  4. Move, or remove, the /etc/xcat/cfglog file as it points xCAT to PostgreSQL. (without this file, xCAT defaults to SQLite):

    mv /etc/xcat/cfgloc /etc/xcat/cfglog.postgres
    
  5. Restore the PostgreSQL database into SQLite:

    XCATBYPASS=1 restorexCATdb -p ~/xcat-dbback
    
  6. Restart xcatd:

    service xcatd start