You are on page 1of 40

VERITAS Cluster Server for UNIX,

Fundamentals

Lesson 5
VCS Operations
Course Overview
 Lesson 1: High Availability Concepts
 Lesson 2: VCS Building Blocks
 Lesson 3: Preparing a Site for VCS
 Lesson 4: Installing VCS
 Lesson 5: VCS Operations
 Lesson 6: Preparing Services for VCS
 Lesson 7: VCS Configuration Methods
 Lesson 8: Online Configuration
 Lesson 9: Offline Configuration
 Lesson 10: Sharing Network Interfaces
 Lesson 11: Configuring Notification
 Lesson 12: Configuring VCS Response to Faults
 Lesson 13: Cluster Communications
 Lesson 14: System and Communication Faults
 Lesson 15: I/O Fencing
 Lesson 16: Troubleshooting
Lesson Topics and Objectives

Topic After completing this lesson, you


will be able to:
Managing Applications in Describe key considerations for
a Cluster Environment managing applications.
Common VCS Operations Perform common cluster
administrative operations.
Using the VCS Simulator Use the VCS Simulator to practice
managing services.
Topic 1: Managing Applications in a
Cluster Environment
After completing this topic, you
will be able to describe key
considerations for managing
applications.
Key Considerations
To manage an application under VCS control:
 Use VCS to start and stop the application.
or
 Direct VCS not to intervene:
1. Freeze the service group.
2. Perform administrative operations outside of VCS.
3. Unfreeze the service group to reenable VCS
control.

You can mistakenly cause problems if you manipulate

!
resources outside of VCS, such as forcing faults:
 Causing failover and downtime
 Preventing failover
VCS Management Tools

CLI Java GUI Web GUI VCS Simulator

 Command-  Thick client  Thin client  Create, model,


line interface  Runs on UNIX  CMC-managed and test
and Windows host mode cluster
 Runs on the
configurations
local system systems  Local mode
 Cannot
manage a
running
cluster
configuration
Topic 2: Service Group Operations

After completing this topic, you


will be able to perform common
VCS operations.
Displaying Cluster Status
 Determine the state of the cluster at a point in time:
hastatus –sum
 Display continuous cluster status:
hastatus

Status and Attributes


Displaying Logs
 VCS log file location: /var/VRTSvcs/log
 HAD (engine) log: engine_A.log
 Java GUI command log:
– Is useful for learning the CLI
– Can be used to create batch files
– Is cleared when you log out of the GUI

Logs
Example: Switching ClusterService

hastatus
Displaying Object Information
 Use hares to display resource information:
hares –display resource
hares –list condition
hares –value resource attribute
hares –state resource
 Use hagrp to display service group information:
hagrp –display group
hagrp –list condition
hagrp –value group attribute
hagrp –state group Getting help:
 Command-line syntax:
– ha_command –help
– man ha_command
 Bundled Agents Reference Guide
Bringing Service Groups Online
 Service groups are brought online:
– Manually, after maintenance WebSG
– Automatically, when VCS is started
 Resources are brought online in Web
order from bottom to top.
IP Mount
 Persistent resources do not affect
service group state. NIC Volume

DiskGroup

online
System S1

Online hagrp -online


Taking Service Groups Offline
 Service groups are taken offline:
– Manually, for maintenance WebSG
– Automatically, when VCS is
stopped or during failover offline
Web
 Resources are taken offline in
order from top to bottom. IP Mount

 A service group is offline when all NIC Volume


nonpersistent resources are
offline. DiskGroup

S1

Offline hagrp -offline


Switching Service Groups
You can switch a service group
between systems to:
 Test failover
 Migrate services for maintenance
VCS: Before
1. Takes resources offline on system S1.
2. Brings resources online on system S2.
Only resources online on system S1
are brought online on system S2.

After

Switch hagrp -switch


Freezing a Service Group
Freeze a service group to prevent offline, online, or
failover actions.
 Example use:
DBA can start and stop database outside of VCS control
 Persistent freeze:
– Remains in effect through VCS restarts
– Frozen=1
 Temporary freeze:
– Only in effect until VCS restarts
– TFrozen=1

! You can cause a concurrency violation and possible data


corruption if you bring an application online outside of VCS.

Freeze hagrp -freeze


Bringing Resources Online
 Resources are brought online:
– Automatically, when a service group
WebSG
is brought online
– Manually, after maintenance
– In dependency order from bottom Web

 Agent runs the online entry point IP Mount


 Online entry point:
NIC Volume
– Runs specific startup operations
– Example: Disk group online
vxdg –t import WebDG DiskGroup

online
S1

Online hares -online


Taking Resources Offline
 Resources are taken offline:
– Automatically, when a service group
OraSG
is taken offline
– Manually, for maintenance
– In dependency order from top Oracle

 Agent runs the offline entry point IP Mount


 Offline entry point:
NIC Volume
– Runs specific shutdown operations
– Example: Database offline
DiskGroup
sqlplus "/as sysdba"
shutdown
Ora1

Offline hares -offline


Topic 3: Using the VCS Simulator

After completing this topic, you


will be able to use the VCS
Simulator to practice managing
the cluster.
Using the VCS Simulator
The VCS Simulator enables you to:
 Learn how to manage VCS using predefined clusters.
 Create and test new cluster configurations.
 Simulate faults to see how VCS responds.
 Use the Java GUI or the Simulator-specific command-
line interface.

Simulator software is:


 Installed automatically on cluster systems if you select all option
software
 Available on the VCS installation DVD:
– UNIX: VRTScssim
– Windows: ./windows/WindowsInstallers/WindowsSimulator
Simulator Java Console
Use the Simulator Java Console to:
 Start and stop
sample Simulator
configurations.
 Launch the Cluster
Manager Java
Console.
 Create new
Simulator
configurations.
 Verify configuration
file syntax.
 Delete simulator
configurations.
Link to 4.1
Creating a New Simulator Configuration
 To add a simulated cluster configuration s pecify the:
– Cluster name
– System name
– Unique port number
– Operating system platform
 After the simulated cluster is created, view the:
– New directory structure:
/opt/VRTScssim/cluster_name
– Configuration files:
 types.cf
 main.cf
Using a Customized Configuration
To use the simulator with existing main.cf and
types.cf files:
1. Create the Simulated cluster.
2. Copy the existing configuration files to:
/opt/VRTScssim/cluster_name/conf/config
3. Verify the configuration file syntax.
4. Start the simulated cluster.
5. Launch the Java Console.
6. Log in with admin/password.
Simulator Command-Line Interface hasim
Use a separate terminal window for each Simulator configuration.

# hasim –setupclus myclus –simport 16555 –wacport -1


# hasim –start myclus_sys1 –clus myclus
# VCS_SIM_PORT=16555
# VCS_SIMULATOR_HOME=/opt/VRTScssim
# export VCS_SIM_PORT VCS_SIMULATOR_HOME
# hasim –sys –state
$System Attribute Value
myclus_sys1 SysState Running
Lesson Summary
 Key Points
– Use VCS tools to manage applications under VCS
control.
– The VCS Simulator can be used to practice
managing resources and service groups.
 Reference Materials
– VERITAS Architect Network (VAN):
http://www.symantec.com/van
– VERITAS Cluster Server Release Notes
– VERITAS Cluster Server User’s Guide
What Did You Learn?
 You are about to be
asked a series of
questions related to the
current topic.
 Click Answer to see the
solutions.
After you place a service under VCS control,
you can continue to start and stop the
application normally.
True
False

Answer
After you place a service under VCS control,
you can continue to start and stop the
application normally.
True
False
The correct answer is False.

Next >>
To manage VCS service groups in a running
cluster, use the:
A. Java GUI, which runs only on a Windows
system
B. Java GUI, which runs only on a UNIX system
C. VCS Simulator on any type of system
D. VCS Java GUI, Web GUI, or CLI

Answer
To manage VCS service groups in a running
cluster, use the:
A. Java GUI, which runs only on a Windows
system
B. Java GUI, which runs only on a UNIX system
C. VCS Simulator on any type of system
D. VCS Java GUI, Web GUI, or CLI
The correct answer is D.

Next >>
A service group is considered offline when:
A. All persistent resources on a system are
offline.
B. All nonpersistent resources on a system are
offline and persistent resources are probed.
C. All nonpersistent resources on a system are
offline.
D. All resources are offline, cleared, and probed.

Answer
A service group is considered offline when:
A. All persistent resources on a system are
offline.
B. All nonpersistent resources on a system are
offline and persistent resources are probed.
C. All nonpersistent resources on a system are
offline.
D. All resources are offline, cleared, and probed.
The correct answer is C.

Next >>
What is one effect of freezing a service group?
A. The service group cannot be failed over.
B. The service group cannot fault.
C. The resources within the service group cannot
fault.
D. The service group cannot be modified.

Answer
What is one effect of freezing a service group?
A. The service group cannot be failed over.
B. The service group cannot fault.
C. The resources within the service group cannot
fault.
D. The service group cannot be modified.
The correct answer is A.

Next >>
The VCS Simulator:
A. Enables you to simulate operations using the
VCS CLI on a running cluster
B. Enables you to simulate operations using the
VCS Java GUI on a running cluster
C. Requires dedicated main.cf and types.cf
configuration files
D. Can be run using any valid main.cf and
types.cf files

Answer
The VCS Simulator:
A. Enables you to simulate operations using the
VCS CLI on a running cluster
B. Enables you to simulate operations using the
VCS Java GUI on a running cluster
C. Requires dedicated main.cf and types.cf
configuration files
D. Can be run using any valid main.cf and
types.cf files
The correct answer is D.

Next >>
Lab 5: Using the VCS Simulator
1. Start the Simulator Java GUI.
hasimgui &
2. Add a cluster.
3. Copy the preconfigured *.cf
files to the new directory.
4. Start the cluster from the
Simulator GUI.
5. Launch the Cluster Manager
Java Console.
6. Log in using the VCS
account oper with password
oper.
This account demonstrates
different privilege levels in
VCS.

Seenext
See next slide
slide for
for classroom values
lab assignments.
Lab 5 Assignments

Fill in the table at the beginning of the Lab 5 in Appendix A or B.

 Source location for the Simulator main.cf:

________________________________________________

 Destination location (local) for the Simulator main.cf :

________________________________________________
End of Presentation
Appendix

This appendix contains slides that are platform


specific, and may be reviewed per the viewer’s
discretion and interest, or you may optionally end
the presentation now.
Removing a Simulator Configuration
 5.0: Use the Simulator GUI.
 Pre-5.0:
– Delete the directory structure from
the /opt/VRTScssim directory.
– Remove the entry from the
/opt/VRTScssim/simconfig file.
– Remove all entries from the
/opt/VRTSvcs/gui/lib/config
.properties file.

Back

You might also like