Running a Script to Rebuild AMPs
To fully restore a local storage instance after a node failure, you can run a script to rebuild the AMPs. Until the AMPs are rebuilt, data is maintained in fallback rows on the other AMPs.
If you are using EBS storage (m4 instance types), replace the EBS volumes before running the tdc-rebuild script. For more information, see Running a Script to Replace EBS Volumes.
The following command options are available with the tdc-rebuild script:
- -w, known as wait mode, keeps the script running without further interaction until AMPs are back online. Used alone or in conjunction with -t.
- -t changes the interval between display of rebuild progress messages from the default value of 4 seconds. Append this option with the number of seconds you want to elapse between status messages. For example, type -wt 20 to display status every 20 seconds.
- Ctrl-c pauses the rebuild with the intention of rerunning it later. Entering #tdc-rebuild restarts the script.
- -c cancels the rebuild process completely if it has started.
- At the command prompt, enter one of the following commands to start the script.
- To run in interactive mode, enter tdc-rebuild.
- To run in non-interactive mode, enter tdc-rebuild -w.
- Enter the Teradata Database super user (dbc) password and press Enter.The script lists the AMPs that will be rebuilt. For example:
FATAL AMPs are: AMP NodeId Cluster State ---- ------ ------- -------0 1-010FATAL**1 1-011FATAL**2 1-012FATAL**3 1-013FATAL**
- When prompted to rebuild the AMPs, enter one of the following:
- y to continue with the rebuild process.
- n to stop the process and not alter the database.
Rebuild these AMPs? (Y/N): y *** Stopping Teradata to initialize pdisks --- Initialized pdisk /dev/pdisk/dsk0 --- Initialized pdisk /dev/pdisk/dsk1 --- Initialized pdisk /dev/pdisk/dsk2 --- Initialized pdisk /dev/pdisk/dsk3*** Restarting Teradata to contine after initializing pdisks --- Booting FATAL AMPs --- Initiating AMP rebuilds 17:22:07 Background rebuild started, log into LOGAMP_0 17:22:07 Background rebuild started, log into LOGAMP_1 17:22:07 Background rebuild started, log into LOGAMP_2 17:22:07 Background rebuild started, log into LOGAMP_3 --- Rebuilds running Wait for rebuilds complete? (Y/N): n
- If running in interactive mode, enter one of the following when prompted whether to wait for the rebuilds to complete:
Option Actions To finish the rebuild without further interaction
- Enter y.
To finish the rebuild based on your continued input
The following output indicates rebuild completion.
- Enter n.
The script displays progress messages and then stops.
- Enter #tdc-rebuild to restart the script.
- Enter the Teradata Database super user (dbc) password and press Enter.
- Repeat the preceding two sub-steps each time the script stops until the rebuild finishes.
--- AMP rebuilds completed *** Restarting Teradata to set rebuilt AMPs online --- Rebuild complete