- 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
- 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
- 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.
- 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 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.
- Use the following command to check the version:
- 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.
- 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.
- Disable NFR using the following command on the first node.
psh mv /usr/local/bin/tdc-nodestart /usr/local/bin/tdc-nodestart.upgrade
- Stop all the instances and change instance types either through console or using:
psh init 0
- From the AWS Console, wait until all instances are in the Stopped state. This may take several minutes.
- 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.
- 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.
- Select Apply.
- 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.
- 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
- 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
- Change Array Type in vconfig either manually or using a tdc command (only available in 09.02.00+ of tdc-packages)
- 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, runtdc 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
- 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.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.
- Automated:
- 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
- Start the database using:
/etc/init.d/tpa start psh pdestate -W
- Enable NFR using:
psh mv /usr/local/bin/tdc-nodestart.upgrade /usr/local/bin/tdc-nodestart
- Enable DBS Autostart using:
psh pdeconf autostart=1
Verify using:pcl -s /usr/pde/bin/pdeconf
and then capture the post upgrade image. - 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. - Remove any unused capacity reservation to free up resources.
In case of an issue, use the following steps to revert scale up:
- Stop the database using:
tpareset -x -y stop for upgrade psh pdestate -w psh pdeconf -s AutoStart=0
- Stop all database instances in AWS console or use psh init 0
- Change the instance type back to original instance type using the below instructions.
- From the AWS Console, wait until all instances are in the stopped state. This may take several minutes.
- 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.
- 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.
- 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.
- Move the backup vconfig file back to its original location.
mv /etc/opt/teradata/tdconfig/vconfig_bkp.txt /etc/opt/teradata/tdconfig/vconfig.txt
- 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
- Restart tdsched service:
psh systemctl restart Teradata-tdsched
- Enable NFR:
psh mv /usr/local/bin/tdc-nodestart.upgrade /usr/local/bin/tdc-nodestart
- Enable AutoStart:
psh mv /usr/local/bin/tdc-nodestart.upgrade /usr/local/bin/tdc-nodestart
- Start the database using:
/etc/init.d/tpa start