This chapter provides instructions on how to configure and administer the Sun Cluster HA for Sybase ASE data service on your Sun Cluster nodes.
This chapter contains the following procedures.
"How to Configure Sybase ASE Database Access With Solstice DiskSuite"
"How to Register and Configure Sun Cluster HA for Sybase ASE"
"How to Verify the Sun Cluster HA for Sybase ASE Installation "
You must configure the Sun Cluster HA for Sybase ASE data service as a failover service. See the Sun Cluster 3.0 U1 Concepts document and Chapter 1, Planning for Sun Cluster Data Services for general information about data services, resource groups, resources, and other related topics.
The following table lists sections that describe the installation and configuration tasks.
Table 10-1 Task Map: Installing and Configuring Sun Cluster HA for Sybase ASE
Task |
For Instructions, Go To |
---|---|
Prepare to install the Sun Cluster HA for Sybase ASE data service | |
Install the Sybase ASE 12.0 software | |
Create the Sybase database environment | |
Install the Sun Cluster HA for Sybase ASE package | |
Register Sun Cluster HA for Sybase ASE resource types and configure resource groups and resources | |
Verify the Sun Cluster HA for Sybase ASE installation | |
Understand Sun Cluster HA for Sybase ASE logging and security issues |
"Understanding Sun Cluster HA for Sybase ASE Logging and Security Issues" |
Configure Sun Cluster HA for Sybase ASE extension properties |
"Configuring Sun Cluster HA for Sybase ASE Extension Properties" |
View fault-monitor information |
To prepare Sun Cluster nodes for the Sun Cluster HA for Sybase Adaptive Server 12.0 installation, select an installation location for the following files.
Sybase ASE application files - These files include Sybase ASE binaries and libraries. You can install these files on either the local file system or the cluster file system.
See "Determining the Location of the Application Binaries" for the advantages and disadvantages of placing the Sybase ASE binaries on the local file system as opposed to the cluster file system.
Sybase ASE configuration files - These files include the interfaces file, config file, and environment file. You can install these files on the local file system (with links) or on the cluster file system.
Database data files - These files include Sybase device files. You must install these files on the cluster file system as either raw devices or regular files.
Use the procedures in this section to complete the following tasks.
Prepare the Sun Cluster nodes.
Install the Sybase ASE software.
Verify the Sybase ASE installation.
Before you configure the Sun Cluster HA for Sybase ASE data service, use the procedures that the Sun Cluster 3.0 U1 Installation Guide describes to configure the Sun Cluster software on each node.
This procedure describes how to prepare the cluster nodes for Sybase ASE software installation.
Perform all steps in this procedure on all Sun Cluster nodes. If you do not perform all steps on all nodes, the Sybase ASE installation will be incomplete, and the Sun Cluster HA for Sybase ASE data service will fail during startup.
Consult the Sybase ASE documentation before you perform this procedure.
Become superuser on all nodes.
Configure the /etc/nsswitch.conf file as follows so that the Sun Cluster HA for Sybase ASE data service starts and stops correctly if a switchover or failover occurs.
On each node that can master the logical host that runs the Sun Cluster HA for Sybase ASE data service, include one of the following entries for group in the /etc/nsswitch.conf file.
group: group: group: files [NOTFOUND=return] nis group: file [NOTFOUND=return] nisplus |
The Sun Cluster HA for Sybase ASE data service uses the su user command to start and stop the database node. The user is typically sybase_id. The network information name service might become unavailable when a cluster node's public network fails. Adding one of the preceding entries for group ensures that the su(1M) command does not refer to the NIS/NIS+ name services if the network information name service is unavailable.
Configure the cluster file system for the Sun Cluster HA for Sybase ASE data service.
If raw devices contain the databases, configure the global devices for raw-device access. See the Sun Cluster 3.0 U1 Installation Guide for information on how to configure global devices.
If you use the Solstice DiskSuite volume manager, configure the Sybase ASE software to use UNIX file system (UFS) logging or raw-mirrored metadevices. See the Solstice DiskSuite documentation for information on how to configure raw-mirrored metadevices.
Prepare the SYBASE_HOME directory on a local or multihost disk.
If you install the Sybase ASE binaries on a local disk, use a separate disk if possible. Installing the Sybase ASE binaries on a separate disk prevents the binaries from overwrites during operating environment reinstallation.
On each node, create an entry for the database administrator (DBA) group in the /etc/group file, and add potential users to the group.
You typically name the DBA group dba. Verify that the root and sybase_id users are members of the dba group, and add entries as necessary for other DBA users. Make sure that group IDs are the same on all nodes that run the Sun Cluster HA for Sybase ASE data service, as the following example illustrates.
dba:*:520:root,sybase_id |
You can create group entries in a network name service. If you do so, also add your entries to the local /etc/inet/hosts file to eliminate dependency on the network name service.
On each node, create an entry for the Sybase system administrator.
You typically name the Sybase system administrator sybase_id. The following command updates the /etc/passwd and /etc/shadow files with an entry for the Sybase system administrator.
# useradd -u 120 -g dba -d /Sybase-home sybase_id |
Make sure that the sybase_id user entry is the same on all nodes that run the Sun Cluster HA for Sybase ASE data service.
Perform the following steps to install the Sybase ASE software.
Become superuser on a cluster member.
Note the Sybase ASE installation requirements.
You can install Sybase ASE binaries on one of the following locations.
Local disks of the cluster nodes
Cluster file system
Before you install the Sybase ASE software on the cluster file system, start the Sun Cluster software and become the owner of the disk device group.
See "Preparing to Install Sun Cluster HA for Sybase ASE" for more information about installation locations.
Create a failover resource group to hold the network and application resources.
# scrgadm -a -g resource-group [-h nodelist] |
Specifies the name of the resource group. This name can be your choice but must be unique for resource groups within the cluster.
Specifies an optional, comma-separated list of physical node names or IDs that identify potential masters. The order here determines the order in which the Resource Group Manager (RGM) considers primary nodes during failover.
Use the -h option to specify the order of the node list. If all the nodes in the cluster are potential masters, you do not need to use the -h option.
Verify that you have added all logical hostnames that the Sun Cluster HA for Sybase ASE data service uses to either the /etc/inet/hosts file or to your name-service (NIS, NIS+) database.
Add a logical hostname to the failover resource group.
# scrgadm -a -L -g resource-group -l logical-hostname \ [-j resource] [-n netiflist] |
Specifies a logical hostname. The logical hostname is the network interface (IP address) that clients use to access the Sun Cluster HA for Sybase ASE data service.
Specifies an optional name for the logical-hostname resource. If you do not specify a name, the default resource name appears as the first name after the -l option.
Specifies an optional comma-separated list that identifies the NAFO groups on each node. The netiflist must represent all nodes in the resource group's nodelist. If you do not specify this option, the scrgadm command attempts to discover a network adapter on the subnet that the hostnamelist identifies for each nodelist node.
Login as sybase_id.
Install the Sybase ASE software.
Regardless of where you install the Sybase ASE software, modify each node's /etc/system files as you would in standard Sybase ASE installation procedures. For instructions on installing Sybase ASE software, refer to the Sybase installation and configuration guides.
For every Sybase server, enter the logical hostname when asked to specify its name.
After you install the Sybase ASE software, go to "How to Configure Sybase ASE Database Access With Solstice DiskSuite" if you use the Solstice DiskSuite volume manager. Go to "How to Configure Sybase ASE Database Access With VxVM" if you use the VERITAS Volume Manager (VxVM).
Perform the following steps to verify the Sybase ASE software installation.
Verify that the sybase_id user and the dba group own the $SYBASE_HOME directory and $SYBASE_HOME children directories.
Run the scstat(1M) command to verify that the Sun Cluster software functions correctly.
The procedures in this section enable you to complete the following tasks.
Configure Sybase ASE database access with Solstice DiskSuite or VxVM.
Create the Sybase ASE database environment.
If you use the Solstice DiskSuite volume manager, perform the following steps to configure Sybase ASE database access with the Solstice DiskSuite volume manager.
Configure the disk devices for the Solstice DiskSuite software to use.
See the Sun Cluster 3.0 U1 Installation Guide for information on how to configure Solstice DiskSuite.
If you use raw devices to contain the databases, run the following commands to change each raw-mirrored metadevice's owner, group, and mode.
If you do not use raw devices, do not perform this step.
If you create raw devices, run the following commands for each device on each node that can master the Sybase ASE resource group.
# chown sybase_id /dev/md/metaset/rdsk/dn # chgrp dba_id /dev/md/metaset/rdsk/dn # chmod 600 /dev/md/metaset/rdsk/dn |
Specifies the name of the diskset.
Specifies the name of the raw disk device within the metaset diskset.
Verify that the changes are effective.
# ls -lL /dev/md/metaset/rdsk/dn |
If you use VxVM software, perform the following steps to configure Sybase ASE database access with the VxVM software.
Configure the disk devices for the VxVM software to use.
See the Sun Cluster 3.0 U1 Installation Guide for information on how to configure VERITAS Volume Manager.
If you use raw devices to contain the databases, run the following commands on the current disk-group primary to change each device's owner, group, and mode.
If you do not use raw devices, do not perform this step.
If you create raw devices, run the following command for each raw device.
# vxedit -g diskgroup set user=sybase_id group=dba_id mode=0600 volume |
Specifies the name of the disk group.
Specifies the name of the volume within the disk group.
Verify that the changes are effective.
# ls -lL /dev/vx/rdsk/diskgroup/volume |
Reregister the disk device group with the cluster to keep the VxVM namespace consistent throughout the cluster.
# scconf -c -D name=diskgroup |
Before you perform this procedure, ensure that you have completed the following tasks.
Establish a highly available IP address and name, that is, a logical hostname that operates at installation time.
Locate device paths for all Sybase ASE devices-including the master device and system devices-in the highly available cluster file system. Configure device paths as one of the following file types.
Regular files
Raw devices
Files that the Solstice DiskSuite software or the VxVM software manage
Locate the Sybase ASE server logs in either the cluster file system or the local file system.
The Sybase ASE 12.0 environment consists of the data server, backup server, monitor server, text server, and XP server. The data server is the only server that you must configure-you can choose whether to configure all other servers.
The entire cluster must contain only one copy of the interfaces file. The $SYBASE directory contains the interfaces file. If you plan to maintain per-node file copies, make sure the file contents are identical.
All clients that connect to Sybase ASE servers connect with Sybase OpenClient libraries and utilities. When you configure the Sybase ASE software, in the interfaces file, enter information about the logical hostname and various ports. All clients use this connection information to connect to the Sybase ASE servers.
The Sun Cluster software supports only the Sybase ASE 12.0 Base 32-bit configuration.
Perform the following steps to create the Sybase ASE database environment.
Run the GUI-based utility srvbuild to create the Sybase ASE database.
The $SYBASE/ASE_12-0/bin directory contains this utility. See the Sybase ASE document entitled "Installing Sybase Adaptive Server Enterprise on Sun Solaris 2.x (SPARC)."
To verify successful database installation, make sure that all servers start correctly.
Run the ps(1) command to verify the operation of all servers. Sybase ASE server logs indicate any errors that have occurred.
Set the password for the Sybase ASE system administrator account.
See the Sybase Adaptive Server Enterprise System Administration Guide for details on changing the "sa" login password.
Create a new Sybase ASE account for fault monitoring.
This account enables the fault monitor to perform the following tasks.
Support queries to system tables.
Create and update user tables.
Do not use the sa account for these purposes.
See "Sun Cluster HA for Sybase ASE Fault Monitor" for more information.
Update the stop file with the sa password.
Because the stop file contains the sa password, protect the file with the appropriate permissions, and place the file in a directory that the system administrator chooses. Enable only the sybase_id user to read, write, and execute the stop file.
If you set up another Sybase ASE configuration on the same cluster, do not use sybase_id as the user ID for the additional configuration.
See "Important Security Issues" for more information about the stop file.
After you create the Sybase ASE database environment, go to "How to Install Sun Cluster HA for Sybase ASE Packages".
You can use the scinstall(1M) utility to install SUNWscsyb, the Sun Cluster HA for Sybase ASE data-service package, on a cluster. Do not use the -s option to non-interactive scinstall to install all data-service packages.
If you installed the SUNWscsyb data-service package as part of your initial Sun Cluster installation, proceed to "Registering and Configuring Sun Cluster HA for Sybase ASE". Otherwise, use the following procedure to install the SUNWscsyb package.
You need the Sun Cluster Agents CD to complete this procedure. Perform this procedure on all cluster nodes that run the Sun Cluster HA for Sybase ASE package.
Load the Agents CD into the CD-ROM drive.
Run the scinstall utility with no options.
This step starts the scinstall utility in interactive mode.
Select the Add Support for New Data Service to This Cluster Node menu option.
This option enables you to load software for any data services that exist on the CD.
Exit the scinstall utility.
Unload the CD from the drive.
When you finish the Sun Cluster HA for Sybase ASE package installation, go to "How to Register and Configure Sun Cluster HA for Sybase ASE".
Use the procedures in this section to complete the following tasks.
Register and configure the Sun Cluster HA for Sybase ASE data service - Register and configure Sun Cluster HA for Sybase ASE as a failover data service.
Configure the SUNW.HAStorage resource type - Register and configure resources and resource groups for the Sybase ASE server. See Chapter 1, Planning for Sun Cluster Data Services and the Sun Cluster 3.0 U1 Concepts document for details on resources and resource groups.
This procedure describes how to use the scrgadm(1M) command to register and configure the Sun Cluster HA for Sybase ASE data service.
Other options also enable you to register and configure the data service. See "Tools for Data-Service Resource Administration" for details about these options.
To perform this procedure, you must have the following information.
The names of the cluster nodes that master the data service.
The logical hostname that clients use to access the data service. You typically configure the IP address when you install the cluster. See the sections in the Sun Cluster 3.0 U1 Installation Guide on planning the Sun Cluster environment and on how to install the Solaris operating environment for details.
The path to the Sybase ASE application installation.
Perform the following steps on one cluster member.
Become superuser on a cluster member.
Run the scrgadm command to register resource types for the Sun Cluster HA for Sybase ASE data service.
# scrgadm -a -t SUNW.sybase |
Adds the resource type for the data service.
Specifies the resource-type name that is predefined for your data service.
Create Sybase ASE application resources in the failover resource group.
# scrgadm -a -j resource -g resource-group \ -t SUNW.sybase \ -x Environment_File=environment-file-path \ -x Adaptive_Server_Name=adaptive-server-name \ -x Backup_Server_Name=backup-server-name \ -x Text_Server_Name=text-server-name \ -x Monitor_Server_Name=monitor-server-name \ -x Adaptive_Server_Log_File=log-file-path \ -x Stop_File=stop-file-path \ -x Connect_string=user/passwd \ |
Specifies the resource name to add.
Specifies the resource-group name into which the RGM places the resources.
Specifies the resource type to add.
Sets the environment-file name.
Sets the adaptive-server name.
Sets the backup-server name.
Sets the text-server name.
Sets the monitor-server name.
Sets the path to the log file for the adaptive server.
Sets the path to the stop file.
Specifies the user name and password that the fault monitor uses to connect to the database.
You do not have to specify extension properties that have default values. See "Configuring Sun Cluster HA for Sybase ASE Extension Properties" for more information.
Run the scswitch(1M) command to complete the following tasks.
Enable the resource and fault monitoring.
Move the resource group into a managed state.
Bring the resource group online
# scswitch -Z -g resource-group |
The SUNW.HAStorage resource type synchronizes actions between HA storage and the Sun Cluster HA for Sybase ASE data service. The Sun Cluster HA for Sybase ASE data service is disk intensive, and therefore you should configure the SUNW.HAStorage resource type.
See the SUNW.HAStorage(5) man page and "Relationship Between Resource Groups and Disk Device Groups" for more information about the SUNW.HAStorage resource type. See "How to Set Up SUNW.HAStorage Resource Type for New Resources" for the procedure on how to configure the SUNW.HAStorage resource type.
After you register and configure the Sun Cluster HA for Sybase ASE data service, go to "How to Verify the Sun Cluster HA for Sybase ASE Installation ".
Perform the following verification tests to make sure that you have correctly installed and configured the Sun Cluster HA for Sybase ASE data service.
These sanity checks make sure that all nodes that run the Sun Cluster HA for Sybase ASE data service can start the Sybase ASE data server. These checks also ensure that other nodes in the configuration can access the Sybase ASE data server. Perform these sanity checks to isolate any problems with starting the Sybase ASE software from the Sun Cluster HA for Sybase ASE data service.
Log in to the node monitoring the Sybase ASE resource group.
Set the Sybase ASE environment variables.
The environment variables are the variables you specify with the Environment_file extension property. You typically name these variables SYBASE.sh.
Verify that the Sun Cluster HA for Sybase ASE resource is online.
# scstat -g |
Inspect the Sybase ASE logs to determine the cause of any errors that have occurred.
Confirm that you can connect to the data server and execute the following test command.
# isql -S adaptive-server -U sa isql> sp_help isql> go isql> quit |
Kill the process for the Sybase ASE data server.
The Sun Cluster software restarts the process.
Switch the resource group that contains the Sybase ASE resource to another cluster member.
# scswitch -z -g resource-group -h node |
Log in to the node that now contains the resource group.
Sybase ASE client connections cannot survive a Sun Cluster HA for Sybase ASE switchover. If a switchover occurs, the existing client connections to Sybase ASE terminate, and clients must reestablish their connections. After a switchover, the time that is required to replay the Sybase ASE transaction log determines Sun Cluster HA for Sybase ASE recovery time.
The following sections contain information about Sun Cluster HA for Sybase ASE logging and security issues.
The Sun Cluster HA for Sybase ASE data service logs messages to the file message_log in the /opt/SUNWscsyb/log directory. Although this file cannot exceed 512 Kbytes, the Sun Cluster HA for Sybase ASE data service does not delete old log files. The number of log files, therefore, can grow to a large number.
The Sun Cluster HA for Sybase ASE data service writes all error messages in the syslog file. The Sun Cluster HA for Sybase ASE data service also logs fault-monitor history to the file restart_history in the log directory. These files can also grow to a large number.
As part of your regular file maintenance, check the following log files and remove files that you no longer need.
syslog
message_log
restart_history
The Sun Cluster HA for Sybase ASE data service requires that you embed the system administrator's password in a stop file. The /opt/SUNWscsyb directory contains the template for the stop file, Sybase_stop_servers. The Sun Cluster HA for Sybase ASE data service uses this file to log in to the Sybase ASE environment and to stop the Sybase ASE servers. Enable the sybase_id user to execute the stop file, but protect the file from general access. Give read, write, and execute privileges to only the following users.
sybase_id user
sybase_id group
This section describes how to configure Sun Cluster HA for Sybase ASE extension properties. Typically, you use the command line scrgadm -x parameter=value to configure extension properties when you create the Sybase ASE resources. You can also use the procedures described in Chapter 11, Administering Data-Service Resources to configure them later.
See the r_properties(5) and the rg_properties(5) man pages for details on all Sun Cluster extension properties.
Table 10-2 describes the extension properties that you can set for the Sybase ASE server resource. You can update some extension properties dynamically. You can update others, however, only when you create or disable a resource. The Tunable column in the following table indicates when you can update each property.
Table 10-2 Sun Cluster HA for Sybase ASE Extension Properties
Name/Data Type |
Default |
Range |
Tunable |
Description |
---|---|---|---|---|
Environment_File |
None |
Minimum=1 |
When disabled |
File that contains all Sybase ASE environment variables. |
Adaptive_Server_Name |
None |
Minimum=1 |
When disabled |
Data-server name. The Sun Cluster HA for Sybase ASE data service uses this property to locate the RUN server in the $SYBASE/$ASE/install directory. |
Backup_Server_Name |
Null |
|
When disabled |
Backup-server name. The Sun Cluster HA for Sybase ASE data service uses this property to locate the RUN server in the $SYBASE/$ASE/install directory. If you do not set this property, the Sun Cluster HA for Sybase ASE data service will not manage the server. |
Monitor_Server_Name |
Null |
|
When disabled |
Monitor-server name. The Sun Cluster HA for Sybase ASE data service uses this property to locate the RUN server in the $SYBASE/$ASE/install directory. If you do not set this property, the Sun Cluster HA for Sybase ASE data service will not manage the server. |
Text_Server_Name |
Null |
|
When disabled |
Text-server name. The Sun Cluster HA for Sybase ASE data service uses this property to locate the RUN server in the $SYBASE/$ASE/install directory. If you do not set this property, the Sun Cluster HA for Sybase ASE data service will not manage the server. |
Adaptive_Server_Log_ File |
None |
Minimum=1 |
When disabled |
The Sybase ASE data-server log. The Sun Cluster HA for Sybase ASE data service continually reads this property for error monitoring. |
Stop_File |
None |
Minimum=1 |
When disabled |
The Sun Cluster HA for Sybase ASE data service uses this property during server stoppages. This property contains the sa password. Protect this property from general access. |
Probe_timeout |
30 seconds |
1 - 99999 seconds |
Any time |
Time-out value for the fault-monitor probe. |
Debug_level |
0 |
0 - 15 |
Any time |
Debug level for writing to the Sun Cluster HA for Sybase ASE log. |
Connect_string |
None |
Minimum=1 |
When disabled |
String of format user/password. The Sun Cluster HA for Sybase ASE data service uses this property for database probes. |
Connect_cycle |
5 |
1 - 100 |
Any time |
Number of fault-monitor probe cycles before the Sun Cluster HA for Sybase ASE data service establishes a new connection. |
Wait_for_online |
FALSE |
TRUE - FALSE |
Any time |
Whether the start method waits for the database to come online before exiting. |
The Sun Cluster HA for Sybase ASE fault monitor queries the Sybase ASE server to determine server health.
The fault monitor consists of the following processes.
a main fault-monitor process
a database-client fault probe
The following sections describe the Sun Cluster HA for Sybase ASE fault-monitor processes and the extension properties that the fault monitor uses.
The fault-monitor process diagnoses errors and checks statistics. The monitor labels an operation successful if the following conditions occur.
The database is online.
The activity check returns no errors.
The test transaction returns no errors.
If an operation fails, the main process checks the action table for an action to perform and then performs the predetermined action. If an operation fails, the main process can perform the following actions, which execute external programs as separate processes in the background.
switchover
stopping the server
restarting the server
stopping the resource group
restarting the resource group
The server fault monitor also scans the Adaptive_Server_Log file and acts to correct any errors that the scan identifies.
The database-client fault probe performs activity checks and test transactions. The extension property Connect_string specifies an account that performs all database operations. The extension property Probe_timeout sets the time-out value that the probe uses to determine time that has elapsed in a successful database probe.
The fault monitor uses the following extension properties.
Thorough_probe_interval
Retry_count
Retry_interval
Probe_timeout
Connect_string
Connect_cycle
Adaptive_Server_Log
See "Configuring Sun Cluster HA for Sybase ASE Extension Properties" for more information about these extension properties.