Scale Up or Down Manually | Teradata VantageCloud Enterprise on AWS (DIY) - Scaling Instances Up or Down Manually - Teradata® VantageCloud Enterprise on AWS

VantageCloud Enterprise on AWS (DIY) Installation and Administration Guide - 2.4

Deployment
VantageCloud
Edition
Enterprise
Product
Teradata® VantageCloud Enterprise on AWS
Release Number
2.4
Published
April 2024
Language
English (United States)
Last Update
2024-07-15
dita:mapPath
kma1662437965174.ditamap
dita:ditavalPath
nat1649317391363.ditaval
dita:id
jnv1467245119674
Product Category
Cloud
PrerequisiteYou must have the ec2:ModifyInstanceAttribute permission to scale instances up or down manually.
  1. Disable Autoscaling of HSN nodes. If HSN exists, then run:
    tdc-hot-standby --hsn-status

    Note down the HSN count from the previous command as you have to deploy the same number of nodes as given in step 15.

    Run the following command to disable HSN nodes:

    tdc-hot-standby -m 0
  2. Shut Down database.

    Before attempting to upgrade, shut down the database and disable Autostart to prevent it from starting again.

    tpareset -x -y stop
    psh pdestate -w
    psh pdeconf -s AutoStart=0
  3. Check version of tdc-packages using:
    rpm -q --queryformat "%{NAME} %{RELEASE}\n" tdc-awstools tdc_core tdc_rest
    The output appears similar to:
    rpm -q --queryformat "%{NAME} %{RELEASE}\n" tdc-awstools tdc_core tdc_rest
    tdc-awstools 08.07.00.00r77_py27
    tdc_core 08.07.00.00r35_py27
    tdc_rest 08.07.00.00r66_py27
    
    If the tdc-packages are lower than 09.01.00, upgrade the packages to at least 09.01.00 or latest version by creating a change request in https://support.teradata.com to get the latest Analytics database version installed with the latest tdc-packages.

    The tdc-package for Teradata Analytics Database 17.20.03.XX is 09.06.00.

  4. Ensure that all the nodes of analytics database has hwperfinfo_aws RPM version as 7.2.1 or above, and is same across all nodes.
    • Use the following command to check the version:
      rpm -qa hwperfinfo_aws
    • Use the following command to confirm the same version on all nodes:
    • psh rpm -q --queryformat "%{NAME} %{RELEASE}\n" hwperfinfo_aws
    If the rpm versions of hwperfinfo_aws is same on all the nodes and is on 7.2.1 or above, continue with step 5.

    If the versions of hwperfinfo_aws are different, raise a change request in https://support.teradata.com to get the latest hwperfinfo_aws and the same installed on all the nodes.

  5. Check the following table to get the ARRAY type info:

    SNC Entries (with EBS volumes) all end with **_SSD_NPC. In the table, XX refers to instance type size.

    Example: For a R5-4x-large instance it will be AWS_R54XL_SSD_NPC, R5-12x-large instance it will be, AWS_R512XL_SSD_NPC.

    Instance Family Array Name Example
    R5 AWS_R5**XL_SSD_NPC
    R6i AWS_R6I**XL_SSD_NPC

    Make a note of the ARRAY type by using the previous table which you can use to change ARRAY type in new vconfig file in step 9.

  6. Create the image using:
    tdc-image --pma-id 33
    Perform this step only if you have requested Teradata to carry out an upgrade for analytics database or hwperfinfo_aws or OS. You need not perform this step if the analytics database and hwperfinfo_aws versions are same across all nodes and are already more than the recommended versions.

    The image creation may take approximately one hour. Ensure you are not disconnected from the system.

  7. Disable NFR using the following command on the first node.
    psh mv /usr/local/bin/tdc-nodestart /usr/local/bin/tdc-nodestart.upgrade
  8. Stop all the instances and change instance types either through console or using:
    psh init 0
    1. From the AWS Console, wait until all instances are in the Stopped state. This may take several minutes.
    2. Once all instances are stopped, change their instance types by selecting one instance at a time and select Actions, then Instance settings, and then select Change instance type.
    3. In the Change instance type page, select instance sizes up to two sizes more than the current instance size or two sizes less than the current instance size within the same instance type.
    4. Select Apply.
    5. Once the instance size is reflected in the EC2 dashboard, repeat 8a through 8d for every analytics database node.

    Once all instances have been updated to their new instance type, start them from the console.

  9. Create a backup of
    vconfig file in the first node using:
    cp /etc/opt/teradata/tdconfig/vconfig.txt
     /etc/opt/teradata/tdconfig/vconfig_bkp.txt
  10. Create a new vconfig file in the first node using:
    /usr/pde/bin/vconfig -r
    
    The output appears as:
    9092 bytes successfully read from Vconfig GDO
    /etc/opt/teradata/tdconfig/vconfig.txt written
    
  11. Change Array Type in vconfig either manually or using a tdc command (only available in 09.02.00+ of tdc-packages)
    1. Automated:

      Starting from 09.02.00+ version of the tdc-packages, you may also use an automated command to update the Array type in the vconfig.

      On the first node, run
      tdc update_array_type_sf

      A sample output is given here for reference.

      SMP001-01:~ tdc update_array_type_sf                           
      
      Execution started at: 2024-03-07 15:39:33
      ----------------------------------------------------------------------
      - update array type ........................................ SUCCEEDED
      
      ----------------------------------------------------------------------
      Execution Finished At: 2024-03-07 15:39:38
      Execution Status: SUCCEEDED
       
      Execution finished successfully.
      
      SMP001-01:~
      
      This command will automatically look up the current instance type and set the correct value. Once run, send the updated vonfig to all the nodes:
      pcl -send /etc/opt/teradata/tdconfig/vconfig.txt /etc/opt/teradata/tdconfig
      pcl -send /etc/opt/teradata/tdconfig/vconfig.gdo /etc/opt/teradata/tdconfig
      
    2. Manual: Open the newly created vconfig file and change the ARRAY_TYPE of all the pdisks to the selected ARRAY_TYPE from the previous section. For example, AWS_R6I24XLT1_SSD_NPC is the array type for R6I 24x instance type.
      Array Sample
      Save the vonfig file, generate the GDOs using:
      /usr/pde/bin/vconfig
      Reading from /etc/opt/teradata/tdconfig/vconfig.txt
      9092 bytes successfully read from Vconfig GDO	
      9092 bytes successfully written to Vconfig GDO
      
      and send the updated vconfig file to all nodes using:
      pcl -send /etc/opt/teradata/tdconfig/vconfig.txt /etc/opt/teradata/tdconfig
      pcl -send /etc/opt/teradata/tdconfig/vconfig.gdo /etc/opt/teradata/tdconfig
      
      .
      This method only restarts tdsched on the current node. Follow the next steps to restart tdsched on all the nodes.
  12. Restart tdsched using:
    psh systemctl restart teradata-tdsched
    Before the database can be started, tdcshed needs to be restarted to take the new values. Wait until all the nodes have the service running. You can check the status using:
    psh systemctl status teradata-tdsched
  13. Start the database using:
    /etc/init.d/tpa start
    psh pdestate -W
    
  14. Enable NFR using:
    psh mv /usr/local/bin/tdc-nodestart.upgrade /usr/local/bin/tdc-nodestart
  15. Enable DBS Autostart using:
    psh pdeconf autostart=1
    Verify using:
    pcl -s /usr/pde/bin/pdeconf
    and then capture the post upgrade image.
  16. Enable Autoscaling of HSN Nodes by using the HSN count from Step 2 and run
    tdc-hot-standby -m X 
    tdc-hot-standby --hsn-status
    
    Replace X with your HSN count.
  17. Remove any unused capacity reservation to free up resources.
TroubleshootingReverting Scale Up

In case of an issue, use the following steps to revert scale up:

  1. Stop the database using:
    tpareset -x -y stop for upgrade
    psh pdestate -w
    psh pdeconf -s AutoStart=0
    
  2. Stop all database instances in AWS console or use psh init 0
  3. Change the instance type back to original instance type using the below instructions.
    1. From the AWS Console, wait until all instances are in the stopped state. This may take several minutes.
    2. Once all instances are stopped, change their instance types by selecting one instance at a time and select Actions, then Instance Settings, and then Change Instance type.
    3. In the Change instance type page, select instance sizes up to two sizes above the current instance size or two sizes below the current instance size within the same instance type.
    4. Once the instance size is reflected in the EC2 dashboard repeat (a) through (c) for every analytics database node.

    Once all instances have been updated to their new instance type, start them from the console.

  4. Move the backup vconfig file back to its original location.
    mv /etc/opt/teradata/tdconfig/vconfig_bkp.txt /etc/opt/teradata/tdconfig/vconfig.txt 
  5. Change Array Type in vconfig:

    Starting in 09.02.00+ version of the tdc packages, you may also use an automated command to update the Array type in the vconfig

    On the first node, run tdc update_array_type_sf

    This command will automatically look up the current instance type, and automatically set the correct value. Once run, send the updated vconfig to all the nodes

    pcl -send /etc/opt/teradata/tdconfig/vconfig.txt /etc/opt/teradata/tdconfig
    pcl -send /etc/opt/teradata/tdconfig/vconfig.gdo /etc/opt/teradata/tdconfig
    
  6. Restart tdsched service:
    psh systemctl restart Teradata-tdsched
  7. Enable NFR:
    psh mv /usr/local/bin/tdc-nodestart.upgrade /usr/local/bin/tdc-nodestart
  8. Enable AutoStart:
    psh mv /usr/local/bin/tdc-nodestart.upgrade /usr/local/bin/tdc-nodestart
  9. Start the database using:
    /etc/init.d/tpa start