Upgrade HP Vertica database from 6.1 to 7.0

Vertica version upgrades are an incremental and must follow one of the following upgrade paths:

HP Vertica 3.5 to 4.0

HP Vertica 4.0 to 4.1

HP Vertica 4.1 to 5.0

HP Vertica 4.1 to 5.1

HP Vertica 5.0 to 5.1

HP Vertica 5.0 to 6.0

HP Vertica 5.1 to 6.0

HP Vertica 6.0 to 6.1

HP Vertica 6.1 to 7.0

For this example we will use a single node Vertica database installation.

  • Check your database version and see the objects we have in it first:
  • [dbadmin@bih001 ~]$ vsql
    Password:
    Welcome to vsql, the Vertica Analytic Database interactive terminal.
    
    Type:  h or ? for help with vsql commands
           g or terminate with semicolon to execute query
           q to quit
    
    dbadmin=> select version();
                  version
    ------------------------------------
     Vertica Analytic Database v6.1.3-0
    (1 row)
    
    dbadmin=> d
                    List of tables
     Schema |   Name   | Kind  |  Owner  | Comment
    --------+----------+-------+---------+---------
     public | test_tbl | table | dbadmin |
    (1 row)
    
    dbadmin=> select * from test_tbl;
     id |  name
    ----+--------
      1 | Adrian
    (1 row)
    
    
      
  • 2- Back up your existing database. This is a precautionary measure so that you can restore from the backup if the upgrade is unsuccessful. Follow this article to see how to make a full backup of your vertica database.
  • 3- Stop the database before initiating the upgrade process.
  • You can stop your database using the admintools GUI or using admintools command line options.

    [dbadmin@bih001 ~]$ admintools -t stop_db -F -d test -p test
            Issuing shutdown command to database
    Database test stopped successfully
    
      
  • 4- Download and the Vertica 7.0 from vertica website
  • 5- Install the new Vertica 7.0 to the server.
  • [root@bih001 ~]# rpm -Uvh vertica-7.0.0-1.x86_64.RHEL5.rpm
    Preparing...                ########################################### [100%]
       1:vertica                ########################################### [100%]
    Shutting down vertica services for upgrade
    Shutting down spread daemon
    Stopping spread daemon: [  OK  ]
    
    Shutting down vertica agent daemon
    Stopping vertica agent:
    
    Vertica Analytic Database V7.0.0-1 successfully installed on host bih001
    
    ----------------------------------------------------------------------------------
    Important Information
    ----------------------------------------------------------------------------------
    If you are upgrading from a previous version, you must backup your database before
    continuing with this install.  After restarting your database, you will be unable
    to revert to a previous version of the software.
    ----------------------------------------------------------------------------------
    
    To download the latest Vertica documentation in zip or tar format please visit the
    myvertica web site.
    
    To complete installation and configuration of the cluster,
    run: /opt/vertica/sbin/install_vertica
    
    
      
  • 6- Run the update_vertica script now pointing to the vertica-7.0.0-1.x86_64.RHEL5.rpm
  • [root@bih001 sbin]# /opt/vertica/sbin/update_vertica --rpm /root/vertica-7.0.0-1.x86_64.RHEL5.rpm
    Vertica Analytic Database 7.0.0-1 Installation Tool
    
    
    >> Validating options...
    
    
    >> Starting installation tasks.
    >> Getting system information for cluster (this may take a while)...
    
    Default shell on nodes:
    127.0.0.1 /bin/bash
    
    >> Validating software versions (rpm or deb)...
    
    
    >> Beginning new cluster creation...
    
    backing up admintools.conf on 127.0.0.1
    
    >> Creating or validating DB Admin user/group...
    
    Successful on hosts (1): 127.0.0.1
        Provided DB Admin account details: user = dbadmin, group = verticadba, home = /home/dbadmin
        Creating group... Group already exists
        Validating group... Okay
        Creating user... User already exists
        Validating user... Okay
    
    
    >> Validating node and cluster prerequisites...
    
    Failures during local (OS) configuration for verify-127.0.0.1.xml:
        HINT (S0151): https://my.vertica.com/docs/7.0.x/HTML/index.htm#cshid=S0151
            These disks do not have known IO schedulers:
            '/dev/mapper/vg_bih001-lv_root' ('') = ''
        HINT (S0305): https://my.vertica.com/docs/7.0.x/HTML/index.htm#cshid=S0305
            TZ is unset for dbadmin. Consider updating .profile or .bashrc
        HINT (S0041): https://my.vertica.com/docs/7.0.x/HTML/index.htm#cshid=S0041
            Could not find the following tools normally provided by the mcelog
            package: mcelog
        HINT (S0040): https://my.vertica.com/docs/7.0.x/HTML/index.htm#cshid=S0040
            Could not find the following tools normally provided by the pstack or
            gstack package: pstack/gstack
        WARN (S0170): https://my.vertica.com/docs/7.0.x/HTML/index.htm#cshid=S0170
            lvscan (LVM utility) indicates some active volumes.
        FAIL (S0030): https://my.vertica.com/docs/7.0.x/HTML/index.htm#cshid=S0030
            ntpd process is not running: ['ntpd', 'ntp']
    
    System prerequisites failed.  Threshold = WARN
            Hint: Fix above failures or use --failure-threshold
    
    Installation FAILED with errors.
    
    ****
    AdminTools and your existing Vertica databases may be unavailable.
    Investigate the above warnings/errors and re-run installation.
    ****
    
      

    We can see that we have some errors, so because of the version change that pre-reqs are different as well

  • 7- After you had fixed the FAIL errors you can continue the update by using the --failure-threshold NONE as the Failures are only hints.
  • [root@bih001 sbin]# /opt/vertica/sbin/update_vertica --rpm /root/vertica-7.0.0-1.x86_64.RHEL5.rpm --failure-threshold NONE
    Vertica Analytic Database 7.0.0-1 Installation Tool
    
    
    >> Validating options...
    
    
    >> Starting installation tasks.
    >> Getting system information for cluster (this may take a while)...
    
    Default shell on nodes:
    127.0.0.1 /bin/bash
    
    >> Validating software versions (rpm or deb)...
    
    
    >> Beginning new cluster creation...
    
    backing up admintools.conf on 127.0.0.1
    
    >> Creating or validating DB Admin user/group...
    
    Successful on hosts (1): 127.0.0.1
        Provided DB Admin account details: user = dbadmin, group = verticadba, home = /home/dbadmin
        Creating group... Group already exists
        Validating group... Okay
        Creating user... User already exists
        Validating user... Okay
    
    
    >> Validating node and cluster prerequisites...
    
    Failures during local (OS) configuration for verify-127.0.0.1.xml:
        HINT (S0151): https://my.vertica.com/docs/7.0.x/HTML/index.htm#cshid=S0151
            These disks do not have known IO schedulers:
            '/dev/mapper/vg_bih001-lv_root' ('') = ''
        HINT (S0305): https://my.vertica.com/docs/7.0.x/HTML/index.htm#cshid=S0305
            TZ is unset for dbadmin. Consider updating .profile or .bashrc
        HINT (S0041): https://my.vertica.com/docs/7.0.x/HTML/index.htm#cshid=S0041
            Could not find the following tools normally provided by the mcelog
            package: mcelog
        HINT (S0040): https://my.vertica.com/docs/7.0.x/HTML/index.htm#cshid=S0040
            Could not find the following tools normally provided by the pstack or
            gstack package: pstack/gstack
        WARN (S0170): https://my.vertica.com/docs/7.0.x/HTML/index.htm#cshid=S0170
            lvscan (LVM utility) indicates some active volumes.
    
    System prerequisites passed.  Threshold = NONE
    
    
    >> Establishing DB Admin SSH connectivity...
    
    Installing/Repairing SSH keys for dbadmin
    
    
    >> Setting up each node and modifying cluster...
    
    Creating Vertica Data Directory...
    
    Updating agent...
    
    >> Sending new cluster configuration to all nodes...
    
    
    >> Completing installation...
    
    Running upgrade logic
    Spread upgrade required.  Some nodes have a shared/legacy vspread.conf
    Upgrading database 'test' ...
    (For databases with large catalogs, this may take some time.)
    Distributing new config from node 'v_test_node0001' around the cluster
    Marking spread upgrade complete on all hosts
    Installation complete.
    
    Please evaluate your hardware using Vertica's validation tools:
        https://my.vertica.com/docs/7.0.x/HTML/index.htm#cshid=VALSCRIPT
    
    To create a database:
      1. Logout and login as dbadmin. (see note below)
      2. Run /opt/vertica/bin/adminTools as dbadmin
      3. Select Create Database from the Configuration Menu
    
      Note: Installation may have made configuration changes to dbadmin
      that do not take effect until the next session (logout and login).
    
    To add or remove hosts, select Cluster Management from the Advanced Menu.
  • 8- Start your database now.
  • [dbadmin@bih001 ~]$ admintools -t start_db -F -d test -p test
            Starting nodes:
                    v_test_node0001 (127.0.0.1)
    
            Starting Vertica on all nodes. Please wait, databases with large catalogs may take a while to initialize.
    
            Node Status: v_test_node0001: (INITIALIZING)
            Node Status: v_test_node0001: (INITIALIZING)
            Node Status: v_test_node0001: (UP)
            Running upgrade hooks
    Database test started successfully
     
  • 9- See the version and the objects of your database now.
  •   [dbadmin@bih001 ~]$ vsql -d test -w test -c 'select version()'
                  version
    ------------------------------------
     Vertica Analytic Database v7.0.0-1
    (1 row)
    
    dbadmin=> d
                    List of tables
     Schema |   Name   | Kind  |  Owner  | Comment
    --------+----------+-------+---------+---------
     public | test_tbl | table | dbadmin |
    (1 row)
    
    dbadmin=> select * from test_tbl;
     id |  name
    ----+--------
      1 | Adrian
    (1 row)
    
    
      
  • Very important
  • Downgrade installations are not supported.