- Installation and Configuration Guide
- Upgrade to STA 2.4.0
- Upgrade STA
- Upgrade the Old Database (Task 9)
Upgrade the Old Database (Task 9)
Upgrade the old STA database schema to the latest one for STA.
- Stop all STA services:
$ STA stop all
- If you determined in Verify the Environment Meets Requirements that the size of
/tmp
is not sufficient for the upgrade, increase the size of/tmp
as necessary.If this is not possible, set an environment variable for MySQL to use an alternate temp location:
- Create an alternate temp location and assign open permissions to it.
For example:
$ mkdir /dbbackup/tmp $ chmod 777 /dbbackup/tmp
- Stop MySQL:
$ STA stop mysql
- Edit the MySQL configuration file. For example:
$ vi /etc/my.cnf
- In the
mysqld
section of the file, add a line defining the alternate temp location, which is identified by thetmpdir
variable. Following is an example of the file after this line has been added.[mysqld] #----- mysqld MySQL Server Options ------------------------- tmpdir = /dbbackup/tmp server-id = 1 ...
- Restart MySQL:
$ STA start mysql
- Create an alternate temp location and assign open permissions to it.
For example:
- Change to the database updates directory.
$ cd /<Oracle_storage_home>/StorageTek_Tape_Analytics/db/updates
- Start the upgrade script.
For example:
$ ./upgradedb.sh
- Wait until you see the finish banner before proceeding.
+-------------------------------------------------------------+ | Started.................2021-04-09 08:15:31 | | Finished................2021-04-09 08:17:51 | | Elapsed Time............01:52:26 | | Starting Version........65.00r0 | | Final Schema Version....74.00r0 | | Schema Release Date.....2021-04-07 17:06:02 | | Records (approximate)...4,819,802 | +-------------------------------------------------------------+
The log files in /var/log/tbi/install also contain a record of the upgrade progress. If you previously upgraded the database with sudo or root access, the log files were created with root ownership. Now, if you upgrade using the oracle user, you may see the following message (where the ## can vary):
/usr/bin/mysql: Can't create/write to file '/var/log/tbi/install/apply_updates##.log' (Errcode: 13 - Permission denied)
This error results from the oracle user trying to update the log file which has root ownership. The error causes no problem for the actual database upgrade and the success of the upgrade can be verified in the finish banner.
- If you increased the size of
/tmp
or created an alternate temp location, restore it to its normal size and location. - Start all STA services:
$ STA start all
- This step is optional. Delete the
STA_FRESH_INSTALL_BACKUP.sql
file to free up disk space on the STA database backup volume. - To check the level of the database, log into the STA GUI and click About... in the bottom right of the screen. Verify the Current Database Schema Version: 74.00.