Académique Documents
Professionnel Documents
Culture Documents
HA-VCS-410-101A-2-10-SRT (100-002147)
COURSE DEVELOPERS Disclaimer
Bilge Gerrits
The information contained in this publication is subject to
Siobhan Seeger
change without notice. VERITAS Software Corporation
Dawn Walker
makes no warranty of any kind with regard to this guide,
including, but not limited to, the implied warranties of
merchantability and fitness for a particular purpose.
VERITAS Software Corporation shall not be liable for errors
LEAD SUBJECT MATTER
EXPERTS contained herein or for incidental or consequential damages in
Geoff Bergren connection with the furnishing, performance, or use of this
Connie Economou manual.
Dave Rogers
Copyright
Jim Senicka
Pete Toemmes Copyright 2005 VERITAS Software Corporation. All
rights reserved. No part of the contents of this training
material may be reproduced in any form or by any means or
be used for the purposes of training or education without the
TECHNICAL written permission of VERITAS Software Corporation.
CONTRIBUTORS AND
REVIEWERS Trademark Notice
Billie Bachra
Barbara Ceran VERITAS, the VERITAS logo, and VERITAS FirstWatch,
Bob Lucas VERITAS Cluster Server, VERITAS File System, VERITAS
Gene Henriksen Volume Manager, VERITAS NetBackup, and VERITAS
HSM are registered trademarks of VERITAS Software
Corporation. Other product names mentioned herein may be
trademarks and/or registered trademarks of their respective
companies.
VERITAS Cluster Server for UNIX, Example Application
Configurations
April 2005 Release
Table of Contents i
Copyright 2005 VERITAS Software Corporation. All rights reserved.
ii VERITAS Cluster Server for UNIX, Example Application Configurations
Copyright 2005 VERITAS Software Corporation. All rights reserved.
Introduction
VERITAS Cluster Server Curriculum
Courses
Optional
VERITAS Guide
Cluster Server
Fundamentals
VERITAS Cluster
Server, Example
Application
Configurations
High Availability
Fundamentals
Guide Prerequisites
This guide assumes that you have mastered the fundamentals of VERITAS Cluster
Server. You should also have an administrator-level understanding of one or more
UNIX platforms, including the ability to configure systems, storage devices, and
networking in multiserver environments. A basic understanding of VERITAS
Volume Manager is also required.
Introduction Intro3
Copyright 2005 VERITAS Software Corporation. All rights reserved.
Guide Objectives
After completing the VERITAS Cluster Server for
UNIX, Example Application Configurations
guide, you will be able to:
Configure an Application resource to manage an
application in a VCS environment.
Configure Oracle and Netlsnr resources and set
up detail monitoring of an Oracle database
instance.
Configure NFS and Share resources to make an
NFS service highly available.
Guide Objectives
The VERITAS Cluster Server for UNIX, Example Application Configurations
guide simulates the job tasks you perform to configure common applications in a
VCS environment.
Guide Resources
This guide contains modules with conceptual and configuration information for
each topic. Lab exercises enable you to practice your new skills, and solutions are
provided to guide you through the exercises.
Lab materials are provided in three forms, with increasing levels of detail to suit a
range of student expertise levels.
Appendix A: Lab Synopses has high-level task descriptions and design
worksheets.
Appendix B: Lab Details includes the lab procedures and detailed steps.
Appendix C: Lab Solutions includes the lab procedures and steps with the
corresponding command lines required to perform each step.
Appendix D: Design Worksheet Template provides a blank design
worksheet.
Additional supplements may be used in the classroom or provided to you by your
instructor.
Introduction Intro5
Copyright 2005 VERITAS Software Corporation. All rights reserved.
Legend
These are common symbols used in this guide.
Symbol Description
Server, node, or cluster system (terms
used interchangeably)
Storage
Application service
Cluster interconnect
VCS resource
Introduction Intro7
Copyright 2005 VERITAS Software Corporation. All rights reserved.
Intro8 VERITAS Cluster Server for UNIX, Example Application Configurations
Copyright 2005 VERITAS Software Corporation. All rights reserved.
Example 1
Clustering Applications
Lesson Topics and Objectives
Introduction
Overview
This module describes how agents manage resources in a VCS cluster. In this
module you are also introduced to the VCS bundled Application agent.
Importance
Understanding how agents work helps you to determine the best way to manage
your application service in a high availability environment.
Outline of Topics
Application Service Overview
VCS Agents for Managing Applications
The Application Agent
1
IP Address
Network
Network NIC
Daemons
File System Processes
Volume
Application
Application
S1 Disk Group
S2
Storage
Storage
Application Requirements
The most important requirements for an application to run in a cluster are crash
tolerance and host independence. This means that the application should be able to
recover after a crash to a known state, in a predictable and reasonable time, on two
or more hosts.
Most commercial applications today satisfy this requirement. More specifically, an
application is considered well-behaved and can be controlled using a VCS agent if
the application meets the following criteria:
There must be a defined start and stop procedure that can be automated.
If the application fails, it must be possible to clean up anything left behind,
such as defunct processes, reserved memory segments, and so on.
It should be possible to check the status of the application using an automated
method. Monitoring an application can be performed in many ways. In general,
the closer a test emulates what the users of the application do, the better the test
is in discovering problems. However, this may impact the performance of the
application. VCS may also detect problems that you want administrator
intervention to solve, such as running out of tablespace in a database.
Therefore, the monitoring should be carefully balanced to ensure that the
application is up while minimizing the overhead and limiting VCS to
appropriate monitoring actions.
1
caching mechanisms contained in a local host. Disk caching for performance
should only be performed on the external array.
The application must be able to restart to a known state without manual
intervention after operational failures, such as a system failure. For example,
an Oracle database guarantees this by acknowledging the clients only after
writing the changes to a log file on the shared disk (the redo logs) when a
commit changes request is received. Anything that has not been committed or
acknowledged is the responsibility of the client and is kept there. So when the
system fails, the database can be brought up on another system because the
other system has access to the redo logs and can determine what has been
committed and written to disk. The database can be brought to the exact point
of time of the crash by applying these redo logs.
The application must be host-independent. Some applications are licensed to
the host name, which means that the application does not start on another host
unless the host name is changed. A highly available application should not
have any features that tie it to a specific system in the cluster.
1
An agent runs a single operation on a resource at one
time.
Agents are multithreaded so that operations can be
carried out in parallel on multiple resources of the
same type.
A resource cannot be managed without an agent.
If there are no resources of a particular type
anywhere in the cluster, the agent for that type is not
started.
1
correspond to each agent function.
The agent functions are referred to as entry
points.
Most agents include the online, offline, monitor,
and clean entry points.
Entry points are often implemented as Perl or
shell scripts, in which case they can easily be
customized.
Agents can also be implemented as compiled
executable files.
1
Simplifies managing applications with multiple
processes and enables detailed monitoring.
Requires no additional licensing; is bundled with
VCS.
Is easily customized by creating scripts that the
agent uses within its entry points.
Manages applications using these entry points:
Online Brings an application online using StartProgram
Offline Takes an application offline using StopProgram
Monitor Monitors the status of the application
Clean Takes the application offline using CleanProgram
or kills all the processes specified for the
application
Entry Points
Online: Runs StartProgram with the specified parameters in the specified user
context
Offline: Runs StopProgram with the specified parameters in the specified user
context
Monitor: If no MonitorProgram is specified, verifies that all processes
specified in PidFiles and MonitorProcesses are running
If MonitorProgram is defined, the agent executes the MonitorProgram.
Clean: Kills all the processes specified in PidFiles or in MonitorProcesses
If CleanProgram is defined, the agent executes the CleanProgram.
1
programs.
It must be possible to monitor the application by either
running a program that returns 0 for failure and 1 for
success or by checking a list of processes.
Sample configuration:
Application samba_app (
StartProgram = /usr/sbin/samba start
StopProgram = /usr/sbin/samba stop
PidFiles = { /var/lock/samba/smbd.pid }
MonitorProcesses = { smbd nmbd }
)
Summary
This lesson described how agents manage resources in a VCS cluster. In this lesson
you are also introduced to the VCS bundled Application agent.
Next Steps
Now that you understand how agents manage applications, you can configure
other common types of high availability services.
Additional Resources
VERITAS Cluster Server Bundled Agents Reference Guide
This guide describes each bundled agent in detail.
VERITAS Cluster Server Agent Developers Guide
This guide provides detailed information about the agent framework and
creating or customizing agents.
VERITAS Cluster Server Agent Development Course
This course provides detailed information about the agent framework and
creating or customizing agents. The course includes labs to customize existing
agents and create new agents.
VERITAS Cluster Server Fundamentals Course
This course provides detailed information about configuring VCS service
groups and resources.
http://www.veritas.com
A list of agents available from VERITAS and partners is available by selecting
Products>Cluster Server>Agents and Options link.
nameSG1
nameSG1
1
nameApp1
Delete
Delete the
the Process
Process name
nameIP1
resource
resource and
and add
add Mount1
an
an Application
Application
resource.
resource.
nameVol1 nameProxy1
Appendix
AppendixA:
A:Lab
LabSynopses
Synopses
nameDG1 Appendix
AppendixB:
B:Lab
LabDetails
Details
Appendix
AppendixC:
C:Lab
LabSolutions
Solutions
See
Seethe
thenext
nextslide
slidefor
forclassroom
classroomvalues.
values.
Goal
The purpose of this lab is to configure the Application agent to manage a service
with multiple processes.
Prerequisites
Obtain any classroom-specific values needed for your classroom lab environment
and record these values in your design worksheet included with the lab exercise
instructions.
Results
Each students service can be started, monitored, and stopped on each cluster
system.
Introduction
Overview
This module describes how to manage database services in a VCS environment.
An Oracle service group is used as an example showing specific agents and
resource types that are provided with VCS enterprise agent for Oracle.
Importance
Database services are a key component of most high availability environments.
Understanding how you can use VCS to manage your database software is critical
to implementing a complete high availability solution.
Outline of Topics
Database Service Example
VCS Database Agents
Database Preparation
The Enterprise Agent for Oracle
Database Failover Behavior
Additional Oracle Agent Functions
Database/
Database/ Application
Listener
Listener Component
File
File System
System IP
IP Address
Address
/db
/db 10.10.21.54
10.10.21.54
Contains
Contains data
data
2
and
and log
log files
files
Storage Network
Network Port
Port
Component NIC_device
NIC_device
VxVM
VxVM Volume
Volume Network
dbvol
dbvol Component
VxVM
VxVM Disk
Disk
Group
Group dbdg
dbdg
Database/Listener
Database/Listener DB/Lsnr
/db
/db 10.10.21.54
10.10.21.54
Mount IP
dbvol
dbvol NIC_device
NIC_device
Volume NIC
dbdg
dbdg
Disk
Group
VCS manages database services in the same way it manages any other application
service. Resources are contained within the service group for each storage and
network and dependencies are defined to ensure that VCS brings the supporting
resources online before attempting to start the database.
The type of resource you use to manage the database depends on your database
software and your specific management requirements.
Informix
Sybase DB2 Sybase
2
MySQL
Note:
Note: Not
Not all
all agents are supported
supported on all platforms.
platforms.
Agent Functions
All agents perform the same basic functionsstart, stop, monitor, clean. The
enterprise agents for databases each perform similar functions.
The agent starts an instance using the database-specific utility (such as sqlplus
for Oracle), usually with a startup profile file name. The instance is likewise
stopped with the database shutdown utility.
Two levels of monitoring can be configured:
Basic monitoring: Scans the process table for database daemon processes
Detail monitoring: Performs a transaction on a test table in the database
Primary Monitoring
The instance can be monitored by scanning the process table for the process IDs
(PIDs) for critical database processes. The processes monitored vary by database.
For example, the Oracle agent monitors the ora_smon, ora_dbw, ora_pmon,
and ora_lgwr processes.
2
The name of the file containing the SQL
statements used to write to the table
Detail Monitoring
When detail monitoring is enabled, the monitor script attempts to write to a test
table in a specified database. If this script fails and failover is enabled, the entire
service group fails over to the next available system.
Writing to the database ensures that failures, such as full logs, are detected.
Reading from the database does not detect this type of error.
In order to write to a database table, you must create the test table in the database
that you are monitoring. Then, provide the agent with the access and configuration
information needed to write to the table:
The database user account with update privileges
The password for the database user account
The name of the database table
SQL statements used to write to the table
Note: Detail monitoring may detect errors that cannot be handled by failover or
restarts, such as a database running out of tablespace. Some agents, such as the
Enterprise Agent for Oracle, provide optional methods of handling these types of
errors. These additional error-handling methods are described later in this lesson.
Oracle
Server
Net8 Data
User ONS Listener
Client Protocol
Server
2
DB2 on AIX
Oracle on
on Solaris
DB2 Agent 4.0
Oracle Agent 4.1
VCS 4.0
VCS
VCS 4.1
4.1 AIX 5.2
Solaris 8,
8, 9, 10
10 DB2 ESE 7.2, 8.1
Oracle 8.0.x, 8i (8.1.x), 9i,
10g
Database Preparation
Verifying Software Compatibility
Ensure that each system that can host the database instance meets the operating
system and database requirements specified in the agent documentation.
Also, ensure that each system has adequate resources, such as shared memory.
Each system in the SystemList of the service group must be properly configured as
a database server.
2
owned permanently by the database. For example:
vxedit g dgname set group=dba user=dba mode=660 vol
Note: You cannot change permission only in UNIX.
VxVM sets volume permissions upon import.
Data Files
You must locate the data files on shared storage so that each failover target system
can access them. Use these guidelines for locating data files in a VCS
environment:
If using file system-based data files, the file systems that contain these files
must be located on shared disks. Create the same file system mount point on
each system in the cluster.
If using raw devices, such as Volume Manager volumes, set the permissions for
the volumes to be owned permanently by the database account. For example:
vxedit g dgname set group=dba user=dba mode=660
volume_name
Note: Volume Manager overrides UNIX permissions. It is not sufficient to
change permissions in UNIX because Volume Manager sets volume
permissions when importing a volume (with default owner is root). You must
also change the Volume Manager permissions, as shown in the slide.
Linux
/etc/passwd
2
/etc/shadow
/etc/group
/etc/services
Shared memory settings:
For drivers built into the kernel, append parameters to the kernel command
line using the boot loader.
For kernel modules, use /etc/modules.conf.
For tunable parameters, use sysctl and /etc/sysctl.conf.
/etc/hosts
LISTENER=
(DESCRIPTION=
listener.ora
listener.ora
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=salesDB)(PORT=1521)
)
(ADDRESS=(PROTOCOL=ipc)(KEY=extproc))))
. . .
/etc/hosts IP
/etc/hosts
. . .
10.10.21.54 salesDB
. . . 10.10.21.54
Network Configuration
Each database service group requires at least one IP address for client connections.
This IP address should fail over together with the database in case of any major
faults.
Therefore, you need to use an IP resource (or an IPMultiNIC resource) and
configure the host name of the service group IP address in the database. The clients
should connect to the host name corresponding to this virtual IP address and not to
the local host names of the servers.
2
Install the agents on each system in the cluster
that can run the database service group.
Sample
SampleOracle
Oracle
Agent
AgentGuides
Guides
Install
Installdatabase.
database. Y More
More
Systems?
Systems?
Configure
Configuredatabase.
database. N Add
Addresource
resourcetypes.
types.
2
Test
Testdatabase.
database. Add
Addservice
servicegroup.
group.
Stop
Stopresources.
resources. Add/test
Add/testresources.
resources.
Install
Installagent.
agent. Test
Testservice
servicegroup.
group.
Netlsnr
IP Oracle
Mount
NIC
Volume
Disk
Group
2
SID AP Oracle
Oracle OraSG_Ora
OraSG_Ora ((
Owner oracle Sid
Sid == AP
AP
Home /ora Owner
Owner == oracle
oracle
Home
Home == ""/ora
/ora""
))
Note: Pfile is a required attribute for versions of the agent prior to 4.1.
Value Action
STARTUP If the Pfile attribute is empty, run: startup
(default) If Pfile is specified, run:
startup pfile=pfile_location
RESTRICTED Starts the database in restricted mode
Attribute Action
IMMEDIATE Runs shutdown immediate
(default)
2
TRANSACTIONAL Performs a transactional stop
The example value for the Encoding attribute sets encoding to the Japanese
language set.
2
User
User defined
defined in
in AP
AP
User = scott database
database with
with update
update
Pword = lgLimHmmKum privileges
privileges for
for testtable
testtable
Table = testtable
MonScript = ./bin/Oracle/SqlTest.pl
)
The
The table
table created
created in The
The executable
executable script
script
AP database
AP database before
before containing
containing SQL
SQL write
write
enabling
enabling the
the VCS
VCS resource
resource statements
statements
Configuration Prerequisites
Create the database user and password for use by VCS.
Create a test table within the monitored database.
Create an executable script with SQL statements.
In this example, the user scott with the password tiger should be defined in
the VRT database with update privileges to the table called testtable. This table
should be created in the database before the additional monitoring is enabled.
Action Description
IGNORE Error is not critical; take no action
2
UNKNOWN Marks the resource state as UNKNOWN
Note: The Sqlnet resource type manages the listener for versions of the Oracle
agent prior to 4.0. The attributes are the same, except LsnrPwd, which is not
supported prior to 4.0.
2
Action: Performs predefined actions on a resource
Netlsnr Oracle
Netlsnr
IP Oracle
IP Mount Mount
Mount
NIC
Binary Data Log Data
NIC
Volume Volume Volume Volume
Disk Disk
Group Group
2
By default, AutoEndBkUp is set to 1, which
takes data files out of backup mode when the
Oracle resource is brought online, enabling
failover.
2
DBUndoRestrict Disables RESTRICTED mode for the database session
DBSuspend Suspends a database (Oracle 8i and later)
DBResume Resumes a suspended database
Initiating Actions
To perform an action on a resource, use the hares command with the following
syntax:
hares -action res token [-actionargs <arg1 ...>] [-sys
system]
The keyword represented as token in the command line example, must be one of
the keywords shown in the left column on the Predefined Actions for Oracle
slide. Example command lines are shown in the slide.
Custom actions can be developed enabling you to perform additional actions. See
the VERITAS Cluster Server Agent Development Guide for more information.
2
Dynamic Information
InstanceStatus Logins OpenMode
Retrieving Information
You can manually invoke the info entry point using the hares command.
The first command line shown in the slide causes the agent to update the value
of the ResourceInfo attribute for the specified resource on the specified system
if the resource is online. If the Info entry point is successful, no output is
displayed.
Note: ResourceInfo is a temporary attributeits values are never dumped to
the main.cf file.
The second command line displays the value of the ResourceInfo attribute.
As an alternative to manually running hares -refreshinfo, you can set the
InfoInterval resource type attribute to a nonzero value. This tells the agent to run
the info entry point periodically, according to the value of the InfoInterval
attribute.
To set the InfoInterval type attribute, use the following syntax:
hatype -modify Oracle InfoInterval seconds
Note: You can add SQL statements to the /opt/VRTSvcs/bin/Oracle/
resinfo.sql file to obtain additional information using the info entry point. For
information on how to customize this file, see the VERITAS Cluster Server
Enterprise Agent for Oracle, Installation and Configuration Guide.
2
VERITAS Cluster Server Bundled Agents
Reference Guide
VERITAS Cluster Server Enterprise Agent for
Oracle, Installation and Configuration Guide
VERITAS Cluster Server Agent Developer's Guide
High Availability Design Using VERITAS Cluster
Server Course
Summary
This lesson described how to put a database service under control of VCS. An
Oracle example was presented to show the resource types and agent functions that
are provided with enterprise agents.
Next Steps
Now that you understand how Oracle agents manage exported file systems, you
can configure other common types of high availability services.
Additional Resources
VERITAS Cluster Server Bundled Agents Reference Guide
This guide describes each bundled agent in detail.
VERITAS Cluster Server Enterprise Agent for Oracle, Installation and Users
Guide
This guide provides detailed information on procedures and concepts for
configuring and managing Oracle using the VCS enterprise agent.
VERITAS Cluster Server Agent Developers Guide
This guide describes how to customize agents, including the info and action
entry points.
High Availability Design Using VERITAS Cluster Server Course
This provides guidance on designing local and global clusters to manage
database environments.
name
nameIP1
*This may be a Oracle1
Process resource if
the Application lab name
was not completed. nameProxy1
Mount1
1.
1. Add
Add an
an Oracle
Oracle
resource. nameVol1 Appendix
AppendixA:
A:Lab
LabSynopses
Synopses
resource.
Appendix
AppendixB:
B:Lab
LabDetails
Details
2.
2. Add
Add aa Netlsnr
Netlsnr Appendix
AppendixC:
C:Lab
LabSolutions
Solutions
resource.
resource.
nameDG1
See
Seethe
thenext
nextslide
slidefor
forclassroom
classroomvalues.
values.
Goal
The purpose of this lab is to make an Oracle database service highly available.
Results
Each students database service can be started, monitored, and stopped on each
cluster system.
Prerequisites
Obtain any classroom-specific values needed for your classroom lab environment
and record these values in your design worksheet included with the lab exercise
instructions.
Introduction
Overview
This module describes a recommended practice to prepare resources and manually
test NFS services before configuring an NFS service group. In this lesson, you are
introduced to the VCS Share and NFS resource types.
Importance
Although understanding how agents work enables you to use any VCS resource
type, you need to have an understanding of the specific application service at hand
to successfully configure the application in a high availability environment.
Understanding how you can use VCS to manage your NFS shares helps you
implement highly available NFS servers.
Outline of Topics
NFS Service Overview
Preparing NFS for High Availability
Testing the NFS Service
Configuring an NFS Service Group
NFS Lock Failover in VCS 4.1
IP Address
Network
Network NIC
Client Network
NFS daemons Requests
Share
File System
Application
Application Volume
Disk Group
3
Storage
Storage
Perform
Performone-time
one-time
configuration
configurationtasks
taskson
on
each
eachsystem.
system.
Start,
Start,verify,
verify,and
and Y
N
More
More Ready
Readyfor
for
stop
stopNFS
NFSservices
servicesonon Systems?
Systems? VCS
VCS
one
onesystem
systemat ataatime.
time.
Shared storage
resources:
IP Disks or components
of a logical volume
manager
Share NIC File systems to be
mounted
Mount NFS Network resources:
IP addresses
Volume Network interfaces
Application (NFS)
resources:
3
DiskGroup
NFS (nfsd, mountd)
Share names
NFS NFS
Request Request
3
Solaris AIX HP-UX Linux
HP-UX
See the HP-UX system documentation for information about changing LVM
device numbers.
Linux
Major and minor device numbers on Linux systems depend entirely on the order of
the SCSI devicesinternal and external are found during system startup.
Therefore, you cannot ensure that major and minor numbers match on different
Linux systems.
Because of this platform-specific limitation, your clients may have problems with
stale file handles to NFS-mounted file systems after a failover. To mitigate this
issue, follow these guidelines:
Ensure that shared storage is on a different controller (than the internal
controller) on each node.
Verify that the SCSI driver for the mentioned controller is loaded after the
internal controller (if such a driver exists).
If both controllers are driven by the same driver then ensure that the internal
controller is on a lower PCI slot.
3
VERITAS Volume Manager minor numbers.
3
Configuring NFS (Application) Components
NFS S2Sn
NFSdaemons,
daemons,exports
exports
Stop
Stopresources.
resources.
Virtual
VirtualIP
IPaddress
address
Test
Testremote
remoteaccess.
access.
Test
Testremote
remoteaccess.
access.
Stop
Stopresources.
resources. Bring
Bringup
upresources.
resources.
3
Solaris AIX HP-UX Linux
IP Address
Network
Network NIC
NFS daemons
File System Share
Volume
Application
Application
S1 Disk Group
S2
3
Storage
Storage
Migrating a Share
Before you place an NFS service under VCS control, it is recommended that you
manually migrate the service between all intended target systems. By doing so,
you:
Ensure that your operating system resources are properly configured on all
potential target cluster systems.
Observe the types of tasks VCS performs to bring a service online, monitor the
status of each resource, and switch a service to another system.
When you have completed the preparation of the testing tasks, you can document
or verify that your design worksheet is complete, and then configure VCS to
manage the NFS services.
Entry Points
Online: Checks whether the nfsd and mountd processes are running
If processes are not running, the online entry point starts them and exits.
Offline: None
Monitor:
Solaris, HP-UX, Linux: Monitors TCP and UDP versions of the processes
by sending RPC calls clnt_create and clnt_call to the RPC server
If calls succeed, the resource is reported as online.
AIX: Determines whether processes are active by querying the SRC
Optional Attributes
Nservers: Specifies the number of concurrent NFS requests the server can
handle
Defaults: Solaris 16; HP-UX 4; AIX 0, obtains the value from the SRC
Nproc (Linux-only): Specifies the number of processes of nfsd to start
The default value is 8.
Protocol (HP-UX only): Specifies the UDP or TCP protocol
3
Solaris AIX HP-UX Linux
Entry Points
Online: Shares an NFS file system
Offline: Unshares an NFS file system
Monitor: If there is an entry in the shared table for the file system specified by
PathName, the resource is reported as online.
Optional Attributes
Options: Specifies options to be used with the share command while sharing the
file system. Defaults are:
Solaris, AIX, HP-UX
No options are specified by default.
Linux
ro, async, wdelay, root_squash
Note: Linux has an additional required attribute, Client, which specifies the host to
which the PathName directory is exported.
Configuration Prerequisites
The file system and share should not be configured automatically during
system startup.
The Mount and NFS resources must be configured in VCS.
statd statd
Status messages
/var/statmon/sm
NFS Client
client1
client2
3
. . .
NFS Server
d
c "Reclaim lock"
lockd lockd
b
statd statd
"Server rebooted" a
/var/statmon/sm
client2
client1
client2
3
. . .
Lock Recovery
The lockd and statd processes also provide recovery for locks in the event that
either a client or service crashes and reboots.
Client failure: When an NFS client crashes (as determined by statd):
a lockd on the server holds the locks the client established before the crash.
b When the client reboots, statd on the client sends new state information
to statd on the server, which passes the information to lockd.
c Applications on the client restart and request locks again as needed.
Note: If a client with locks on a server crashes and is not restarted, the locks
are held indefinitely.
Server failure: When an NFS server crashes and reboots:
a statd on the server sends a message to statd on each registered client
(listed in /var/statmon/sm) indicating that the server has rebooted.
b The client statd process informs the client lockd process that the server
has rebooted.
c The client lockd process attempts to reclaim the locks from the server.
d The server lockd process waits for a defined grace period (default 45
seconds) to grant reclaimed locks before the server revokes the locks and
resumes normal operation.
IP
VCS
VCS4.1
4.1only
only
Share NIC
NFSLock NFS
11
Run the nfs_restart trigger (runs smsyncd).
22
Bring DiskGroup, Volume, and Mount online.
33
Bring NFS online (monitors NFS daemons).
44
Bring NFSLock online (kills lockd, statd).
55
Bring remaining resources online.
3
NFS Service Group Startup Process
This process describes how an NFS service group is started, showing the
relationships between the NFS lock recovery components. The same events occur
when an NFS service group is initially brought online, switched from another
system, or failed over due to a fault.
1 Run the nfs_restart trigger.
For a service group with an NFS resource, the trigger:
a Runs smsyncd in oneshot mode to copy entries from shared storage to the
local /var/statmon/sm directory
b Starts nfsd, statd, and lockd if they are not already running
Note: These daemons are usually configured to start during system boot.
c Starts smsyncd in daemon mode, which copies /var/statmon/sm
entries to shared storage once per second
2 Bring the DiskGroup, Volume, and Mount resources online.
3 Bring the NFS resource online. This starts monitoring nfsd, mountd, statd,
and lockd.
4 Bring NFSLock online. The online entry point:
a Kills lockd to start the grace period
At this point, lockd allows 45 seconds (default) for clients to reclaim
locks.
3
NFS Lock Failover Limitations
Consider these limitations when implementing NFSLock resources in an NFS
service group:
If there are multiple service groups online on each node in the cluster, failing
over a single service group disrupts the locking service for all other groups
online on both the failing-from and failing-to nodes.
There is a time period where the virtual IP address is online but locking
services are not registered on the server. Any NFS client trying to acquire a
lock in this interval would fail and receive an ENOLCK error.
Every second, the smsyncd daemon copies the list of clients that hold the
locks on the shared file system in the service group. If the service group fails
before smsyncd has an opportunity to copy the client list, the clients may not
receive a notification after the service group is brought up. In this case, the
locks cannot be recovered.
You must provide a fully qualified hostname (nfsserver.princeton.edu) for the
NFS server while mounting the file system on the NFS client. If you do not use
a fully qualified hostname, or if you use a virtual IP address (10.122.12.25) or
partial hostname (nfsserver), NFS lock recovery fails.
Ensure that the NFS client stores the same information for the NFS server as
the client uses while mounting the file system. For example, if the NFS client
mounts the file system using fully qualified domain names for the NFS server,
the NFS client directory, /var/statmon/sm, should also have a fully
qualified domain name after the acquisition of locks.
Summary
This lesson described how to put an NFS service under control of VCS.
Next Steps
Now that you understand how NFS agents manage exported file systems, you can
configure other common types of high availability services.
Additional Resources
VERITAS Cluster Server Bundled Agents Reference Guide
This guide describes each bundled agent in detail.
VERITAS Cluster Server Users Guide
This guide provides detailed information on procedures and concepts for
configuring and managing VCS clusters.
VERITAS Cluster Server Installation Guide
This guide provides detailed information about configuring NFS in preparation
for clustering NFS resources.
name nameSG1
nameSG1
IP1
name
nameShare1 nameProxy1
Process1*
*This may be an
Application name
resource if you nameNFS1
Mount1
completed that
lab exercise.
1. Add nameVol1
Add an
an NFS
NFS Appendix
resource. AppendixA:
A:Lab
LabSynopses
Synopses
resource. Appendix
AppendixB:
B:Lab
LabDetails
Details
3
2. Add a Share Appendix
AppendixC:
C:Lab
LabSolutions
Solutions
resource. nameDG1
resource.
Goal
The purpose of this lab is make an NFS service highly available.
Prerequisites
Obtain any classroom-specific values needed for your classroom lab environment
and record these values in your design worksheet included with the lab exercise
instructions.
Results
Each students NFS service can be started, monitored, and stopped on each cluster
system.
nameSG1
nameSG1
nameApp1
Delete
Delete the
the Process
Process name
nameIP1
resource
resource and
and add
add Mount1
an
an Application
Application
resource.
resource.
nameVol1 nameProxy1
Appendix
AppendixA:
A:Lab
LabSynopses
Synopses
nameDG1 Appendix
AppendixB:
B:Lab
LabDetails
Details
Appendix
AppendixC:
C:Lab
LabSolutions
Solutions
See
Seethe
thenext
nextslide
slidefor
forclassroom
classroomvalues.
values.
Lab Assignments
Obtain the values for your classroom.
Object Values
Location of application
script files: loopy_dir
A
Resource Definition Sample Value Your Value
Service Group nameSG1
Resource Name nameApp1
Resource Type Application
Required Attributes
StartProgram /name1/startloopy name 1
/name1
StopProgram /name1/stoploopy /name1
PidFiles /name1/loopypid
Critical? No (0)
Enabled? Yes (1)
a Copy the scripts used by the application resource to your /name1 file
system from the location provided by your instructor:
Script location:
_________________________________________________________
loopy_dir
startloopy
stoploopy
loopy
3 Add the Application resource to the service group using the information in the
design worksheet and bring it online.
PidFiles /name1/loopypid
Critical? No (0)
Enabled? Yes (1)
A
Resource Dependency Definition
Service Group nameSG1
Parent Resource Requires Child Resource
nameApp1 nameIP1
nameApp1 nameMount1
3 Save the cluster configuration and when all students have completed the lab,
close the cluster configuration.
Remove the link from the nameApp1 resource to the nameIP1 resource. An IP
address is not strictly needed for the loopy process to run. Removing the link
provides a simplified service group for any subsequent labs your instructor may
ask you to complete.
2 Save the cluster configuration and when all students using the cluster are
finished, close the cluster configuration.
name
nameIP1
*This may be a Oracle1
Process resource if
the Application lab name
was not completed. nameProxy1
Mount1
1.
1. Add
Add an
an Oracle
Oracle
resource. nameVol1 Appendix
AppendixA:
A:Lab
LabSynopses
Synopses
resource.
Appendix
AppendixB:
B:Lab
LabDetails
Details
2.
2. Add
Add aa Netlsnr
Netlsnr Appendix
AppendixC:
C:Lab
LabSolutions
Solutions
resource.
resource.
nameDG1
See
Seethe
thenext
nextslide
slidefor
forclassroom
classroomvalues.
values.
A
Oracle instance name train1, train5, train9: ORCL1
for your service train2, train6, train10: ORCL2
group
train3, train7, train11: ORCL3
train4, train8, train12: ORCL4
Location of Oracle
data files
Script used for data ORCL1: ORCL1_files.sh
file extraction (train1, train5, train9)
ORCL2: ORCL2_files.sh
(train2, train6, train10)
ORCL3: ORCL3_files.sh
(train3, train7, train11)
ORCL4: ORCL4_files.sh
(train4, train8, train12)
1 Verify that your nameSG1 service group is online on your system; if it is not,
switch it or bring it online on your system.
2 Create a link for your SID to the /name1 file system on your system. You are
assigned a SID based on your system, as shown in the design worksheet.
Note: Be sure to complete this step. If you do not create the link on both systems,
you cannot switch the service group later.
4 Change to the directory containing the scripts for extracting Oracle data files.
Obtain that location from your instructor and record the directory.
Location of scripts:
________________________________________________________
5 Extract the Oracle datafiles by running the script for your SID, supplied in the
worksheet and recorded in the follow space. The script runs tar to copy the
Oracle data files to the shared storage volume you have imported.
Script name:_________________________________
6 Modify the /etc/hosts file on each system in the cluster to add an entry for
the Oracle SID (ORCL#) corresponding to the IP address used for the nameIP1
resource.
A
2 After the Oracle instance is started, start the Listener. Your listener name is the
same name as your SID.
5 Switch your nameSG1 service group to the other system and perform the same
test.
6 Switch your nameSG1 service group to your system and exit from their
system.
All lab participants install the Oracle Enterprise agent on their own systems. If you
have no lab partner, install the agent on each system in the cluster.
Installation directory:
________________________________________________________
install_dir
4 If you do not have a lab partner, install the agent on each system.
Work with your lab partner to add the resource types for Oracle to the cluster.
Use the information in the design worksheet to add an Oracle resource to your
nameSG1 service group.
Owner oracle
Sid ORCL#
Optional Attributes
Pfile /orcl#/admin/ORCL#/pfile/
initORCL#.ora
Critical? No (0)
Enabled? Yes (1)
Use the information in the design worksheet to add a Netlsnr resource to your
nameSG1 service group.
A
Note: If using a version of VCS earlier than 4.0, skip this section and proceed to
the 3.5 Alternate: Adding a Sqlnet Resource section.
Owner oracle
TnsAdmin /oracle/network/admin
Listener ORCL#
Critical? No (0)
Enabled? Yes (1)
If your class is using a version of VCS earlier than 4.0, use the information in the
design worksheet to add a Sqlnet resource to your nameSG1 service group.
Owner oracle
TnsAdmin /oracle/network/admin
Listener ORCL#
Critical? No (0)
Enabled? Yes (1)
Link the Oracle and Listener resources according to the design worksheet.
Test the service group by switching it between the systems. Then, set the Oracle
and Netlsnr resources to critical and test failover.
A
Resetting the Service Group
In this lab section, each student works on their own to remove the Oracle-related
resources. This provides a simplified service group for any subsequent labs your
instructor may ask you to complete.
Note: If you are configuring detail monitoring as shown in the optional lab section,
skip this section and return when you have completed configuring and
testing detail monitoring.
1 Verify that Oracle is online on a system. Switch the nameSG1 service group to
your local system, if it is not already online.
2 Log in as the oracle user on that system and start sqlplus as internal.
5 Create a table named vcs.vcstest and insert a row. This table is used to test
Oracle from VCS.
6 Select the data in the vcs.vcstest table to verify that a row is present.
2 Modify up the nameOracle1 resource for detail monitoring. Use the values
shown in the outlined portion of the worksheet.
A
Resource Name nameOracle1
Resource Type Oracle
Required Attributes
Home /oracle
Owner oracle
SID ORCL#
Optional Attributes
Pfile /orcl#/admin/ORCL#/pfile/
initORCL#.ora
User vcs
Pword vcs
DetailMonitor 1
Table vcstest
MonScript ./bin/Oracle/SqlTest.pl
Critical? No (0)
Enabled? Yes (1)
4 Save the cluster configuration and when all students using the cluster are
finished, close the cluster configuration.
5 Start sqlplus and verify that the vcstest table is being updated at the monitor
interval.
name nameSG1
nameSG1
IP1
name
nameShare1 nameProxy1
Process1*
*This may be an
Application name
resource if you nameNFS1
Mount1
completed that
lab exercise.
1. Add nameVol1
Add an
an NFS
NFS Appendix
resource. AppendixA:
A:Lab
LabSynopses
Synopses
resource. Appendix
AppendixB:
B:Lab
LabDetails
Details
2. Add a Share Appendix
AppendixC:
C:Lab
LabSolutions
Solutions
resource. nameDG1
resource.
Note: Skip this section if you are working on HP-UX or Linux systems.
1 Determine the block device name that will be shared by looking at the
nameMount1 resource attributes in the nameSG1 service group.
2 Verify that the major and minor numbers are the same for each system in the
cluster. If the major numbers do not match, change the numbers for vxio and
vxspec to make them unique and match.
Using the information in the design worksheet, add an NFS resource to your
nameSG1 service group.
A
Resource Definition Sample Value Your Value
Service Group nameSG1
Resource Name nameNFS1
Resource Type NFS
Required Attributes
Critical? No (0)
Enabled? Yes (1)
Using the information in the design worksheet, add a Share resource to your
nameSG1 service group.
Critical? No (0)
Enabled? Yes (1)
Link resources, switch the group between systems, and then verify that clients can
connect.
In this lab section, each student works on their own to remove the NFS-related
resources. This provides a simplified service group for any subsequent labs your
instructor may ask you to complete.
1 Delete the nameShare1 and nameNFS1 resources.
3 Save the cluster configuration and when all students using the cluster are
finished, close the cluster configuration.
nameSG1
nameSG1
nameApp1
Delete
Delete the
the Process
Process name
nameIP1
resource
resource and
and add
add Mount1
an
an Application
Application
resource.
resource.
nameVol1 nameProxy1
Appendix
AppendixA:
A:Lab
LabSynopses
Synopses
nameDG1 Appendix
AppendixB:
B:Lab
LabDetails
Details
Appendix
AppendixC:
C:Lab
LabSolutions
Solutions
See
Seethe
thenext
nextslide
slidefor
forclassroom
classroomvalues.
values.
Lab Assignments
Obtain the values for your classroom.
Object Values
Location of application
script files: loopy_dir
B
Required Attributes
StartProgram /name1/startloopy name 1
/name1
StopProgram /name1/stoploopy /name1
PidFiles /name1/loopypid
Critical? No (0)
Enabled? Yes (1)
1 Verify that the nameSG1 service group is online and running on your system. If
the service group is not online, bring it online on your system.
a Copy the scripts used by the application resource to your /name1 file
system from the location provided by your instructor:
Script location:
_________________________________________________________
loopy_dir
startloopy
stoploopy
loopy
c View the startloopy and stoploopy scripts to determine how they are
used.
11 Set the required attributes for this resource and any optional attributes, if
needed.
14 Verify that the resource is online in VCS and at the operating system level.
Each student configures the dependencies for their own service group.
B
nameApp1 nameIP1
nameApp1 nameMount1
2 Verify that the service group came online properly on the other system.
4 Verify that the service group came online properly on the original system.
6 Save the cluster configuration and view the configuration file to verify your
changes.
7 When all students have completed the lab, close the cluster configuration.
Remove the link from the nameApp1 resource to the nameIP1 resource. An IP
address is not strictly needed for the loopy process to run. Removing the link
provides a simplified service group for any subsequent labs your instructor may
ask you to complete.
B
2 Unlink the nameApp1 and nameIP1 resources.
4 When all students using the cluster are finished, close the cluster configuration.
name
nameIP1
*This may be a Oracle1
Process resource if
the Application lab name
was not completed. nameProxy1
Mount1
1.
1. Add
Add an
an Oracle
Oracle
resource. nameVol1 Appendix
AppendixA:
A:Lab
LabSynopses
Synopses
resource.
Appendix
AppendixB:
B:Lab
LabDetails
Details
2.
2. Add
Add aa Netlsnr
Netlsnr Appendix
AppendixC:
C:Lab
LabSolutions
Solutions
resource.
resource.
nameDG1
See
Seethe
thenext
nextslide
slidefor
forclassroom
classroomvalues.
values.
B
Script used for data ORCL1: ORCL1_files.sh
file extraction (train1, train5, train9)
ORCL2: ORCL2_files.sh
(train2, train6, train10)
ORCL3: ORCL3_files.sh
(train3, train7, train11)
ORCL4: ORCL4_files.sh
(train4, train8, train12)
1 Verify that your nameSG1 service group is online on your system; if it is not,
switch it or bring it online on your system.
2 Create a link for your SID to the /name1 file system on each system as
shown.
Note: Be sure to complete this step. If you do not create the link on both
systems, you cannot switch the service group later.
3 Obtain the location of the scripts provided for extracting Oracle data files from
your instructor and record the directory.
Location of scripts:_________________________________
script_dir
cd script_dir
5 Extract the Oracle data files by running the script for your SID, supplied in the
worksheet and recorded in the following space. The script runs tar to copy
the Oracle data files to the shared storage volume you have imported.
Script name:_________________________________
IP address:_________________________________
b Edit the /etc/hosts files on all systems in the cluster to add your Oracle
SID as the host name (ORCL#) with this IP address. Coordinate edits with
B
your lab partner.
su - oracle
Select the instance for your system, such as ORCL1.
sqlplus "/as sysdba"
startup
exit
2 After the Oracle instance is started, start the Listener. Your listener name is the
same name as your SID. Use the following command (as user oracle):
3 Stop the Listener using the following command (as user oracle):
4 Stop the Oracle instance using the following commands (as user oracle):
6 Log in to their system and perform the same test for Oracle on their system.
rlogin their_sys
a Start Oracle.
su - oracle
Select the instance for your system, such as ORCL1.
sqlplus "/as sysdba"
startup
exit
B
shutdown
exit
exit (back to root)
All lab participants install the Oracle Enterprise agent on their own systems. If you
have no lab partner, install the agent on each system in the cluster.
Installation directory:
____________________________________________________
install_dir
7 If you do not have a lab partner, install the agents on each system.
Work with your lab partner to add the resource types for Oracle to the cluster.
1 Use the GUI to open the cluster configuration, import the Oracle resource
types, and save the configuration.
2 View the main.cf file to see the addition of the include directive for the
B
OracleTypes.cf file.
3 Check the configuration directory for VCS for the presence of the
OracleTypes.cf file.
Owner oracle
Sid ORCL#
Optional Attributes
Pfile /orcl#/admin/ORCL#/pfile/
initORCL#.ora
Critical? No (0)
Enabled? Yes (1)
3 Set the required attributes for this resource and any optional attributes, if
needed.
5 Bring the resource online on your system and verify that the resource is online.
B
Resource Name nameListener1
Resource Type Netlsnr
Required Attributes
Home /oracle
Owner oracle
TnsAdmin /oracle/network/admin
Listener ORCL#
Critical? No (0)
Enabled? Yes (1)
3 Set the required attributes for this resource and any optional attributes, if
needed.
5 Bring the resource online on your system and verify that the resource is online.
Note: Each student completes this section if your class is using a version of VCS
earlier than 4.0.
Owner oracle
TnsAdmin /oracle/network/admin
Listener ORCL#
Critical? No (0)
Enabled? Yes (1)
3 Set the required attributes for this resource and any optional attributes, if
needed.
5 Bring the resource online on your system and verify that the resource is online.
B
nameListener1 nameOracle1
nameListener1 nameIP1
1 Link the Oracle and Listener resources according to the design worksheet.
Test the service group by switching it between the systems. Then set the Oracle
and Netlsnr resources to critical and test failover.
1 Switch the nameSG1 service group to their system and verify that it comes
online.
2 Switch the nameSG1 service group to your system and verify that it comes
online.
5 When all students working in the cluster are finished configuring their Oracle
service groups, close the cluster configuration.
In this lab section, each student works on their own to remove the Oracle-related
resources. This provides a simplified service group for any subsequent labs your
instructor may ask you to complete.
Note: If you are configuring detail monitoring as shown in the optional lab section,
skip this section and return when you have completed configuring and
testing detail monitoring.
B
1 Open the cluster configuration.
7 When all students using the cluster are finished, close the cluster configuration.
1 Verify that Oracle is online on a system. Switch the nameSG1 service group to
your local system, if it is not already online.
su - oracle
Select the instance for your system, such as ORCL1.
4 Create an Oracle user named vcs with the password vcs. Type the following
commands from sqlplus:
6 Create a table named vcs.vcstest and insert a row. This table is used to test
Oracle from VCS:
7 Select the data in the vcs.vcstest table to verify that a row is present:
Use the values in the table to configure the nameOracle1 resource to perform
detailed monitoring.
Owner oracle
SID ORCL#
Pfile /orcl#/admin/ORCL#/pfile/
initORCL#.ora
Optional Attributes
Pfile /orcl#/admin/ORCL#/pfile/
initORCL#.ora
User vcs
Pword vcs
DetailMonitor 1
Table vcstest
MonScript ./bin/Oracle/SqlTest.pl
Critical? No (0)
Enabled? Yes (1)
2 Modify up the nameOracle1 resource for detail monitoring. Use the values
shown in the outlined portion of the worksheet.
Note: Use the encrypted string from the previous step when setting the Pword
attribute.
B
4 Save the cluster configuration.
5 When all students using the cluster are finished, close the cluster configuration.
6 Start sqlplus and verify that the vcstest table is being updated at the monitor
interval.
su - oracle
sqlplus "/ as sysdba"
select TO_CHAR(tstamp,'MON DD, YYYY HH:MI:SS
AM')tstamp from vcs.vcstest;
exit (from sqlplus)
exit (back to root)
name nameSG1
nameSG1
IP1
name
nameShare1 nameProxy1
Process1*
*This may be an
Application name
resource if you nameNFS1
Mount1
completed that
lab exercise.
1. Add nameVol1
Add an
an NFS
NFS Appendix
resource. AppendixA:
A:Lab
LabSynopses
Synopses
resource. Appendix
AppendixB:
B:Lab
LabDetails
Details
2. Add a Share Appendix
AppendixC:
C:Lab
LabSolutions
Solutions
resource. nameDG1
resource.
Note: Skip this section if you are working on HP-UX or Linux systems.
1 Determine the block device name that will be shared by looking at the
nameMount1 resource attributes in the nameSG1 service group.
2 Verify that the major and minor numbers are the same for each system in the
B
cluster.
a Select major numbers that are not in use by any other device by viewing
the /etc/name_to_major file on each system.
b To make the major numbers the same on both systems, use the
haremajor command to change the major numbers for vxio and
vxspec.
Note: You may need to change the major numbers on more than one
system to make them unique for all systems.
Critical? No (0)
Enabled? Yes (1)
5 Bring the resource online if it is not already online. If the NFS daemons were
started by the operating system and running, the resource is marked as online.
B
Required Attributes
PathName /name1
Critical? No (0)
Enabled? Yes (1)
3 Set the required attributes for this resource, and any optional attributes, if
needed.
5 Bring the resource online on your system and verify that the resource is online.
Link resources, switch the group between systems, and then verify that clients can
connect.
4 Verify NFS functionality from a client system using the trainer system in the
classroom, or another system outside of your cluster.
b Create a mount point on the client system using your name as the mount
point.
c Mount the NFS file system on the trainer (or other) system using the virtual
IP address of your nameSG1 service group.
B
10 Save the cluster configuration.
11 When all students using the cluster are finished configuring the NFS service
group, close the cluster configuration.
In this lab section, each student works on their own to remove the NFS-related
resources. This provides a simplified service group for any subsequent labs your
instructor may ask you to complete.
11 When all students using the cluster are finished, close the cluster configuration.
nameSG1
nameSG1
nameApp1
Delete
Delete the
the Process
Process name
nameIP1
resource
resource and
and add
add Mount1
an
an Application
Application
resource.
resource.
nameVol1 nameProxy1
Appendix
AppendixA:
A:Lab
LabSynopses
Synopses
nameDG1 Appendix
AppendixB:
B:Lab
LabDetails
Details
Appendix
AppendixC:
C:Lab
LabSolutions
Solutions
See
Seethe
thenext
nextslide
slidefor
forclassroom
classroomvalues.
values.
Lab Assignments
Obtain the values for your classroom.
Object Values
Location of application
script files: loopy_dir
C
PidFiles /name1/loopypid
Critical? No (0)
Enabled? Yes (1)
1 Verify that the nameSG1 service group is online and running on your system. If
this service group is not online, bring it online on your system.
hastatus -sum
hagrp -switch nameSG1 -to your_sys
or
hagrp -online nameSG1 -sys your_sys
haconf -makerw
haconf -dump
a Copy the scripts used by the application resource to your /name1 file
system from the location provided by your instructor:
Script location:
_________________________________________________________
loopy_dir
startloopy
stoploopy
loopy
ls -l /name1
c View the startloopy and stoploopy scripts to determine how they are
used.
Note: Quotation marks are not required when you use the GUI to
configure the StartProgram and StopProgram attributes.
C
hares -modify nameApp1 Enabled 1
14 Verify that the resource is online in VCS and at the operating system level.
haconf -dump
Each student configures the dependencies for their own service group.
haconf -dump
2 Verify that the service group came online properly on the other system.
hastatus -sum
C
4 Verify that the service group came online properly on the original system.
hastatus -sum
6 Save the cluster configuration and view the configuration file to verify your
changes.
haconf -dump
view /etc/VRTSvcs/conf/config/main.cf
7 When all students have completed the lab, close the cluster configuration.
kill -9 loopy_pid
Remove the link from the nameApp1 resource to the nameIP1 resource. An IP
address is not strictly needed for the loopy process to run. Removing the link
provides a simplified service group for any subsequent labs your instructor may
ask you to complete.
haconf -makerw
haconf -dump
4 When all students have completed the lab, close the cluster configuration.
name
nameIP1
*This may be a Oracle1
Process resource if
the Application lab name
was not completed. nameProxy1
Mount1
1.
1. Add
Add an
an Oracle
Oracle
resource. nameVol1 Appendix
AppendixA:
A:Lab
LabSynopses
Synopses
resource.
Appendix
AppendixB:
B:Lab
LabDetails
Details
2.
2. Add
Add aa Netlsnr
Netlsnr Appendix
AppendixC:
C:Lab
LabSolutions
Solutions
resource.
resource.
nameDG1
See
Seethe
thenext
nextslide
slidefor
forclassroom
classroomvalues.
values.
C
(train3, train7, train11)
ORCL4: ORCL4_files.sh
(train4, train8, train12)
1 Verify that your nameSG1 service group is online on your system; if it is not,
switch it or bring it online on your system.
hastatus -sum
hagrp -online nameSG1 -sys your_sys
or
hagrp -switch nameSG1 -to your_sys
2 Create a link for your SID to the /name1 file system on your system. You are
assigned a SID based on your system, as shown in the design worksheet.
ln -s /name1 /orcl1
ln -s /name1 /orcl2
ln -s /name1 /orcl3
ln -s /name1 /orcl4
Note: Be sure to complete this step. If you do not create the link on both systems,
you cannot switch the service group later.
Solaris, AIX
rsh their_sys ln -s /name1 /orcl1
HP-UX
remsh their_sys ln -s /name1 /orcl1
Linux
ssh their_sys ln -s /name1 /orcl1
C
For SID ORCL2: /orcl2 > /name1
Solaris, AIX
rsh their_sys ln -s /name1 /orcl2
HP-UX
remsh their_sys ln -s /name1 /orcl2
Linux
ssh their_sys ln -s /name1 /orcl2
Solaris, AIX
rsh their_sys ln -s /name1 /orcl3
HP-UX
remsh their_sys ln -s /name1 /orcl3
Linux
ssh their_sys ln -s /name1 /orcl3
Solaris, AIX
rsh their_sys ln -s /name1 /orcl4
HP-UX
remsh their_sys ln -s /name1 /orcl4
Linux
ssh their_sys ln -s /name1 /orcl4
Location of scripts:
___________________________________________________________
script_dir
cd script_dir
6 Extract the Oracle datafiles by running the script for your SID, supplied in the
worksheet and recorded in the following space. The script runs tar to copy the
Oracle data files to the shared storage volume you have imported.
Script name:_________________________________
IP address:_________________________________
b Edit the /etc/hosts files on all systems in the cluster to add your Oracle
SID as the host name (ORCL#) with this IP address. Coordinate edits with
your lab partner.
vi /etc/hosts
C
192.168.xxx.xxx ORCL#
192.168.xxx.xxx ORCLpartner#
Solaris/AIX/Linux
ifconfig -a
HP-UX
netstat -in
su - oracle
Select the instance for your system, such as ORCL1.
sqlplus "/as sysdba"
startup
exit
2 After the Oracle instance is started, start the Listener. Your listener name is the
same name as your SID. Use the following command (as user oracle):
3 Stop the Listener using the following command (as user oracle):
4 Stop the Oracle instance using the following commands (as user oracle):
6 Log in to their system and perform the same test for Oracle on their system.
rlogin their_sys
a Start Oracle.
su - oracle
Select the instance for your system, such as ORCL1.
sqlplus "/as sysdba"
startup
exit
C
hagrp -switch nameSG1 -to your_sys
exit
All lab participants install the Oracle enterprise agent on their own systems. If you
have no lab partner, install the agent on each system in the cluster.
Installation directory:
__________________________________________________________
install_dir
If you do not have a lab partner, install the agents on each system.
cp install_dir/VRTSvcsor.gz /tmp
cd /tmp
gunzip VRTSvcsor.tar.gz
Solaris
pkgadd -d VRTSvcsor
AIX
installp -ac -d VRTSvcsor.rte.bff VRTSvcsor.rte
HP-UX
swinstall -s pkgs VRTSvcsor
Linux
rpm -ihv VRTSvcsor-2.0-Linux.i386.rpm
7 If you do not have a lab partner, install the agents on each system.
Work with your lab partner to add the resource types for Oracle to the cluster.
1 Use the GUI to open the cluster configuration, import the Oracle resource
types, and save the configuration.
C
2 View the main.cf file to see the addition of the include directive for the
OracleTypes.cf file.
view main.cf
3 Check the configuration directory for VCS for the presence of the
OracleTypes.cf file.
ls /etc/VRTSvcs/conf/config
Owner oracle
Sid ORCL#
Optional Attributes
Pfile /orcl#/admin/ORCL#/pfile/
initORCL#.ora
Critical? No (0)
Enabled? Yes (1)
3 Set the required attributes for this resource and any optional attributes, if
needed.
5 Bring the resource online on your system and verify that the resource is online.
haconf -dump
Owner oracle
TnsAdmin /oracle/network/admin
Listener ORCL#
Critical? No (0)
Enabled? Yes (1)
5 Bring the resource online on your system and verify that the resource is online.
C
hares -display nameListener1
haconf -dump
Note: Skip this section unless your class is using a version of VCS earlier than 4.0.
Owner oracle
TnsAdmin /oracle/network/admin
Listener ORCLx
Critical? No (0)
Enabled? Yes (1)
5 Bring the resource online on your system and verify that the resource is online.
C
hares -display nameListener1
haconf -dump
1 Link the Oracle and Listener resources according to the design worksheet.
haconf -dump
Test the service group by switching it between the systems. Then, set the Oracle
and Netlsnr resources to critical and test failover.
1 Switch the nameSG1 service group to their system and verify that it comes
online.
2 Switch the nameSG1 service group to your system and verify that it comes
online.
C
3 Set the nameOracle1 and nameListener1 resources to critical.
haconf -dump
5 When all students working in the cluster are finished configuring their Oracle
service groups, close the cluster configuration.
In this lab section each student works on their own to remove the Oracle-related
resources. This provides a simplified service group for any subsequent labs your
instructor may ask you to complete.
Note: If you are configuring detail monitoring as shown in the optional lab section,
skip this section and return when you have completed configuring and
testing detail monitoring.
haconf -makerw
haconf -dump
7 When all students using the cluster are finished, close the cluster configuration.
1 Verify that Oracle is online on a system. Switch the nameSG1 service group to
your local system, if it is not already online.
su - oracle
Select the instance for your system, such as ORCL1.
C
sqlplus "/as sysdba"
4 Create an Oracle user named vcs with the password vcs. Type the following
commands from sqlplus:
6 Create a table named vcs.vcstest and insert a row. This table is used to test
Oracle from VCS:
haconf -makerw
Use the values in the table to configure the nameOracle1 resource to perform
detailed monitoring.
C
Owner oracle
SID ORCL#
Optional Attributes
Pfile /orcl#/admin/ORCL#/pfile/
initORCL#.ora
User vcs
Pword vcs
DetailMonitor 1
Table vcstest
Monscript ./bin/Oracle/SqlTest.pl
Critical? No (0)
Enabled? Yes (1)
2 Modify the nameOracle1 resource for detail monitoring. Use the values shown
in the outlined portion of the worksheet.
Note: Use the encrypted string from the previous step when setting the Pword
attribute.
haconf -dump
5 When all students using the cluster are finished, close the cluster configuration.
6 Start sqlplus and verify that the vcstest table is being updated at the monitor
interval.
su - oracle
sqlplus "/ as sysdba"
select TO_CHAR(tstamp,'MON DD, YYYY HH:MI:SS
AM')tstamp from vcs.vcstest;
exit (from sqlplus)
exit (back to root)
name nameSG1
nameSG1
IP1
name
nameShare1 nameProxy1
Process1*
*This may be an
Application name
resource if you nameNFS1
Mount1
completed that
lab exercise.
1. Add nameVol1
Add an
an NFS
NFS Appendix
resource. AppendixA:
A:Lab
LabSynopses
Synopses
resource. Appendix
AppendixB:
B:Lab
LabDetails
Details
2. Add a Share Appendix
AppendixC:
C:Lab
LabSolutions
Solutions
resource. nameDG1
resource.
Note: Skip this section if you are working on HP-UX or Linux systems.
1 Determine the block device name that will be shared by looking at the
nameMount1 resource attributes in the nameSG1 service group.
2 Verify that the major and minor numbers are the same for each system in the
cluster.
grep vx /etc/name_to_major
rsh their_sys grep vx /etc/name_to_major
C
3 If the major numbers do not match:
a Select major numbers that are not in use by any other device by viewing
the /etc/name_to_major file on each system.
view /etc/name_to_major
rsh their_sys view /etc/name_to_major
b To make the major numbers the same on both systems, use the
haremajor command to change the major numbers for vxio and
vxspec.
haremajor -vx 90 91
Note: You may need to change the major numbers on more than one
system to make them unique for all systems.
Critical? No (0)
Enabled? Yes (1)
haconf -makerw
5 Bring the resource online if it is not already online. If the NFS daemons were
started by the operating system and running, the resource is marked as online.
haconf -dump
Critical? No (0)
C
Enabled? Yes (1)
3 Set the required attributes for this resource, and any optional attributes, if
needed.
5 Bring the resource online on your system and verify that the resource is online.
haconf -dump
Link resources, switch the group between systems, and then verify that clients can
connect.
4 Verify NFS functionality from a client system using the trainer system in the
classroom, or another system outside of your cluster.
rlogin trainer
b Create a mount point on the client system using your name as the mount
point.
mkdir /name
mount
6 Switch the nameSG1 service group back to your system and verify that the
C
NFS mounted file system remains mounted on the client machine.
umount /name
haconf -dump
11 When all students using the cluster are finished configuring the NFS service
group, close the cluster configuration.
In this lab section, each student works on their own to remove the NFS-related
resources. This provides a simplified service group for any subsequent labs your
instructor may ask you to complete.
haconf -makerw
haconf -dump
11 When all students using the cluster are finished configuring the NFS service
group, close the cluster configuration.
First system:
link
set-cluster
link
link
D
/etc/VRTSvcs/comms/sysname Sample Value Your Value
ClusterAddress
Administrators
Optional Attributes
CounterInterval
System
Required Attributes
FailoverPolicy
SystemList
Optional Attributes
AutoStartList
OnlineRetryLimit
Resource Name
Resource Type
Required Attributes
Optional Attributes
Critical?
Enabled?
Resource Name
Resource Type
Required Attributes
Optional Attributes
D
Critical?
Enabled?
Resource Name
Resource Type
Required Attributes
Optional Attributes
Critical?
Enabled?
Resource Name
Resource Type
Required Attributes
Optional Attributes
D
Critical?
Enabled?