7 Configuring STA Services

Use these procedures to configure the STA Backup service and STA Resource Monitor service utilities.

This chapter includes the following sections:

STA Services Overview

  • STA database backup service—You configure the STA backup service with its administration utility, staservadm. To display a complete list of command options for the utility, type staservadm -h. See the STA Administration Guide for details.

  • STA resource monitor service—You configure the STA resource monitor service with its administration utility, staresmonadm. To display a complete list of command options for the utility, type staresmonadm -h at the command line. See the STA Administration Guide for details.

These service utilities are located in the /Oracle_storage_home/StorageTek_Tape_Analytics/common/bin directory. See "Users, Groups, and Locations Used by the STA Installer" for details about the Oracle storage home.

STA Services Configuration Tasks

General Tasks 

STA Database Backup Configuration Tasks 

STA Resource Monitor Configuration Tasks 

Update the System Path (optional)

Use this procedure to ensure that the STA bin directory is included in the PATH variable for the system root user. The bin directory includes the STA service utilities, staservadm and staresmonadm.

  1. Open a terminal session on the current STA server, and log in as the system root user.

  2. Use a text editor to open the root user profile. For example:

    # vi /root/.bash_profile
    
  3. Add the STA bin directory to the PATH definition. For example, add the following line to the file:

    PATH=$PATH:Oracle_storage_home/StorageTek_Tape_Analytics/common/bin
    

    Where Oracle_storage_home is the Oracle storage home location specified during STA installation.

  4. Save and exit the file.

  5. Log out and log back in as the system root user.

  6. Confirm that the PATH variable has been updated correctly.

    # echo $PATH
    /usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/Oracle/StorageTek_Tape_Analytics/common/bin
    

Restart the STA Services Daemon (optional)

Use this procedure to restart the STA Services daemon, staservd.

This procedure is useful if you changed the configuration settings of the STA Backup or STA Resource Monitor services and you want the new settings to take effect immediately. If you do not use this procedure, the new settings will take effect as soon as the service wakes up from its sleep interval and processes them.

  1. Stop the STA Services daemon.

    # STA stop staservd
    
  2. Start the STA Services daemon.

    # STA start staservd
    
  3. Display the status of the daemon to confirm that it is running.

    # STA status staservd
    

Verify Library Connectivity

When you have finished configuring the services, confirm that all configured libraries have completed their "Get latest data" requests (Last Connection Status should indicate SUCCESS, and STA should be receiving exchange data from the libraries). See the STA User's Guide for details.

Review the STA Database Backup Utility Preferences

Review Table 7-1 for descriptions of the available preference settings and to define your settings.

Table 7-1 STA Backup Service Administration Utility (staservadm) Attributes

Option Attribute Description Default Value Your Value

-S, --scp

-F, --ftp

File transfer type

Method of file transfer used to copy the backup files from the STA server to the backup host. Options are SCP (recommended) or FTP.

SCP

 

-T, --time

Full backup dump time

Time of day STA performs a full database backup dump. The dump is performed automatically every 24 hours at approximately this time. The actual time is sometime within "sleep interval" seconds after this time. Format is hh:mm, using 24-hour time.

00:00

 

-i, --int

Sleep interval

Number of seconds the STA Services daemon waits before checking for new incremental backup files.

300

 

-s, --server

Backup host name

IPv4 or IPv6 address or fully qualified DNS host name of the server host to which the STA server copies its backup files.

NA

 

-u, --usr

Backup user ID

System user ID authorized to perform SCP file transfers to the backup host.

NA

 

-p, --pwd

Backup password

Password assigned to the backup user.

NA

 

-d, --dir

Backup directory

Directory on the backup host where the backup files will be copied.

NA

 

-U, --dbusr

Database username

Database username authorized to perform a mysqldump command. You should specify the STA Database DBA Account username.

NA

 

-P, --dbpwd

Database password

Password of the database username.

NA

 

Configure the Remote Database Backup Server

Use this procedure to configure a remote backup server (or equivalent) to receive the compressed backup files generated by the STA database backup service. Oracle recommends that you configure a remote backup server.

The required space is variable—the size should be a multiple of the size used for the STA database local backup, depending on the number of copies to be retained. Backup server storage should be mirrored or striped.

Note:

This procedure is performed on the remote backup server.
  1. Log in as the system root user.

  2. Create a new group for the STA Backup user. For example:

    # groupadd -g 54321 stabckgr
    

    In this example, the group ID is "stabckgr", and the -g option is used to specify a numerical GID.

  3. Create the STA Backup user. For example:

    # adduser stabck -c "STA database backup user" -m -d /home/stabck -g stabckgr -s /bin/bash -u 98765
    

    In this example, the user ID is "stabck", and the following options are used:

    • -c – Comment.

    • -m – Create a home directory for the user.

    • -d – Absolute path of the home directory.

    • -g – Assign the user to the specified group.

    • -s – Assign the specified login shell to the user.

    • -u – Assign the specified numerical UID to the user.

  4. Assign a password to the STA Backup user. For example:

    # passwd stabck
    Changing password for user stabck.
    New UNIX password: bckpwd1
    Retype new UNIX password: bckpwd1
    passwd: all authentication tokens updated successfully.
    
  5. Create the directory where the STA backups will be copied. For example:

    # cd /home/stabck
    # pwd
    /home/stabck
    # mkdir -p STAbackups
    # ls
    STAbackups
    

    In this example, the "STAbackups" directory is created in the STA Backup user's home directory, and the -p option is used to make parent directories as needed.

  6. Display the user attributes to confirm that all information has been entered correctly. For example:

    # cat /etc/passwd |grep sta
    stabck:x:98765:54321:STA database backup user:/home/stabck:/bin/bash
    
  7. Assign exclusive ownership and access rights for the directory to the STA Backups user and group. For example:

    # chown -R stabck:stabckgr STAbackups
    # chmod -R 700 STAbackups
    # chmod 755 /home/stabck
    

    In this example, the -R option is used to recursively assign the attributes to the directory and its files.

  8. List the directory to confirm that all information has been entered correctly. For example:

    # ls -la |grep STA
    drw------- 2 stabck stabckgr 4096 Oct 19 14:20 STAbackups
    

Configure the STA Database Backup Service

Use this procedure to configure the STA database backup service. You can designate a directory where the backup files will be copied. Oracle recommends that this directory be located on a remote backup server.

Your configuration settings take effect as soon as the service wakes from its current sleep interval and processes new settings or you manually restart the STA Services daemon ("Restart the STA Services Daemon (optional)").

  1. On the STA server, log in as the system root user.

  2. Display the current STA Backup Service settings using the staservadm -Q command.

    This example shows that the service is not yet configured and is therefore not performing backups.

    # ./staservadm -Q
    Contacting daemon...connected.
    Querying Preferences.
     Current STA Backup Service Settings:
       Configured            [no]
       File Transfer      -S [SCP]
       Full Backup        -T [00:00]
       Sleep Interval     -i [300 sec]
       Backup Hostname    -s []
       Backup Username    -u []
       Backup Password    -p []
       Backup Directory   -d []
       Database Username  -U []
       Database Password  -P []
    
  3. Using Table 7-1 as a reference, set the attribute values with the staservadm command.

    You can submit the attributes in separate commands or combine them into one. For example:

    # ./staservadm -S -T 11:00 -i 350 -s stabaksvr -u stabck -p bckpwd1 -d /home/stabck/STAbackups -U sta_dba -P password1
    

    The utility sets each value included in your command and then displays all current settings. For example:

    Contacting daemon...connected.
    Setting File Transfer Type... SCP
    Setting Sleep Interval....... 350
    Setting Backup Hostname...... stabaksvr
    Setting Backup Username...... stabck
    Setting Backup Password...... *******
    Setting Backup Directory..... /home/stabck/STAbackups
    Setting Full Backup Time..... 11:00
    Setting Database Username.... sta_dba
    Setting Database Password.... *********
    Done.
     Current STA Backup Service Settings:
       Configured            [yes]
       File Transfer      -S [SCP]
       Full Backup        -T [11:00]
       Sleep Interval     -i [350 sec]
       Backup Hostname    -s [stabaksvr]
       Backup Username    -u [stabck]
       Backup Password    -p [*******]
       Backup Directory   -d [/home/stabck/STAbackups]
       Database Username  -U [sta_dba]
       Database Password  -P [*********]
    
  4. Review the command output to verify that the values have been set correctly.

Review the STA Resource Monitor Utility Preferences

Review the option descriptions in Table 7-2 and define your settings. A default value of "-1" indicates the attribute has not been configured.

Table 7-2 STA Resource Monitor (staresmonadm) Attributes

Option Attribute Description Default Value Your Value

-T, --time

Daily report time

Time of day STA sends a standard daily report. The report is sent automatically every 24 hours at approximately this time. The actual time is sometime within "sleep interval" seconds after this time. Format is hh:mm, using 24-hour time.

00:00

 

-i, interval

Sleep interval

Number of seconds the STA Resource Monitor waits between scans.

300

 

-n, --nag

Nag mode

Indicates how frequently STA alerts if any high watermarks are reached. If set to "on", STA sends alert emails every time the system is scanned. If set to "off", alerts are simply noted in the standard daily report.

Off

 

-U, --dbusr

Database username

Database username authorized to perform queries against the "information_schema" tables and the MySQL server internal system global variables. You should specify either the STA Database DBA Account username or STA Database Root Account username (root).

NA

 

-P, --dbpwd

Database password

The password assigned to the database username.

NA

 

-t, --tblsphwm

Database tablespace HWM

High watermark for the database tablespace, entered as a percentage of the maximum available.

-1

 

-b, --backvolhwm

Local backup HWM

High watermark for the STA database local backups volume (for example, /dbbackup), entered as a percentage of the maximum possible.

-1

 

-d, --dbvolhwm

Database disk volume HWM

High watermark for the STA database volume (for example, /dbdata ), entered as a percentage of the maximum available.

-1

 

-l, --logvolhwm

Logging disk volume HWM

High watermark for the STA database logs (default is /var/log/tbi), entered as a percentage of the maximum available.

-1

 

-z, --rootvolhwm

Root volume HWM

High watermark for the root volume (/), entered as a percentage of the maximum available.

-1

 

-x, --tmpvolhwm

Tmp volume HWM

High watermark for the temporary directory volume (default is /tmp), entered as a percentage of the maximum available.

-1

 

-m, --memhwm

Physical memory (RAM) HWM

High watermark for the total system memory (except virtual memory), entered as a percentage of the maximum available.

-1

 

-f, --from

Email from

Name or email address that appears in the "From" field of the standard daily report email.

StaResMon@localhost

 

-r, --recips

Email recipients

Recipient email addresses, entered as a colon-delimited list.

NA

 

-s, --subject

Email subject

Entry that appears in the "Subject" field of the standard daily report email, up to 128 characters. Use quotes if it contains spaces. A timestamp in yyyy-mm-dd hh:mm:ss form will be appended to your entry when the email is sent.

STA Resource Monitor Report

 

-o, --outfile

Output data file

Absolute path of the comma-separated (CSV) output data file.

/STA_logs/db/staresmon.csv

For example:

/var/log/tbi/db/staresmon.csv

 

Configure the STA Resource Monitor

Use this procedure to configure the STA Resource Monitor service. Your configuration settings take effect as soon as the service wakes from its current sleep interval and processes new settings or you manually restart the STA Services daemon ("Restart the STA Services Daemon (optional)").

Note:

Oracle recommends that usage for any partition should never exceed 80 percent.
  1. On the STA server, log in as the system root user.

  2. Display the current STA Resource Monitor settings using the staresmonadm -Q command.

    This example shows the service is not yet configured and is therefore not performing scans.

    # ./staresmonadm -Q
    Contacting daemon...connected.
    Querying Preferences.
     Current STA Resource Monitor Service Settings:
       Configured                        [no]
       Send Reports                   -T [00:00]
       Sleep Interval                 -i [300 sec]
       Alert Nagging                  -n [off]
       DB Username                    -U []
       DB Password                    -P []
       DB Tablespace hwm              -t [-1%]
       DB Backup hwm   (/dbbackup)    -b [-1%]
       DB Data hwm     (/dbdata)      -d [-1%]
       Log Volume hwm  (/var/log/tbi) -l [-1%]
       Root Volume hwm (/)            -z [-1%]
       Tmp Volume hwm  (/tmp)         -x [-1%]
       System Memory hwm              -m [-1%]
       Email 'From:'                  -f [StaResMon@localhost]
       Email 'To:'                    -r []
       Email 'Subject:'               -s [STA Resource Monitor Report]
       Output File                    -o [/var/log/tbi/db/staresmon.csv]
    
  3. Using Table 7-2 as a reference, set the attribute values with the staresmonadm command.

    You can submit the attributes in separate commands or combine them into one. For example:

    # ./staresmonadm -T 13:00 -i 600 -n on -U sta_dba -P password1 -t 65 -b 65 -d 65 -l 65 -z 70 -x 80 -m 75 -r john.doe@company.com
    

    The utility sets each value included in your command and then displays all current settings. For example:

    Contacting daemon...connected.
    Setting DB Tablespace HWM..... 65
    Setting DB Disk Volume HWM.... 65
    Setting Logging Volume HWM.... 65
    Setting Backup Volume HWM..... 65
    Setting Root Volume HWM....... 70
    Setting Temp Volume HWM....... 80
    Setting System Memory HWM..... 75
    Setting 'To:' addresses....... john.doe@company.com
    Setting Send Time............. 13:00
    Setting Sleep Interval........ 600
    Setting Alert Nag Mode........ ON
    Setting DB Username........... sta_dba
    Setting DB Password........... *********
    Done.
     Current STA Resource Monitor Service Settings:
       Configured                        [yes]
       Send Reports                   -T [13:00]
       Sleep Interval                 -i [600 sec]
       Alert Nagging                  -n [on]
       DB Username                    -U [sta_dba]
       DB Password                    -P [*********]
       DB Tablespace hwm              -t [65%]
       DB Backup hwm   (/dbbackup)    -b [65%]
       DB Data hwm     (/dbdata)      -d [65%]
       Log Volume hwm  (/var/log/tbi) -l [65%]
       Root Volume hwm (/)            -z [70%]
       Tmp Volume hwm  (/tmp)         -x [80%]
       System Memory hwm              -m [75%]
       Email 'From:'                  -f [StaResMon@localhost]
       Email 'To:'                    -r [john.doe@company.com]
       Email 'Subject:'               -s [STA Resource Monitor Report]
       Output File                    -o [/var/log/tbi/db/staresmon.csv]
    
  4. Review the command output to verify that the values have been set correctly.