Vous êtes sur la page 1sur 98

VERITAS Cluster Server™ 2.

2
Bundled Agents

Reference Guide
Linux

N11563H

January 2004
Disclaimer
The information contained in this publication is subject to change without notice. VERITAS Software
Corporation makes no warranty of any kind with regard to this manual, 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 contained herein or for incidental or consequential damages
in connection with the furnishing, performance, or use of this manual.

VERITAS Legal Notice


Copyright © 1998-2004 VERITAS Software Corporation. All rights reserved. VERITAS, VERITAS
Software, the VERITAS logo, VERITAS VERITAS Cluster Server, and all other VERITAS product
names and slogans are trademarks or registered trademarks of VERITAS Software Corporation.
VERITAS, the VERITAS Logo, and VERITAS Cluster Server Reg. U.S. Pat. & Tm. Off. Other product
names and/or slogans mentioned herein may be trademarks or registered trademarks of their
respective companies.
VERITAS Software Corporation
350 Ellis Street
Mountain View, CA 94043
USA
Phone 650–527–8000 Fax 650–527–2901
www.veritas.com

Third-Party Copyrights

Apache Software
This product includes software developed by the Apache Software Foundation (http://www.apache.org/).
The Apache Software License, Version 1.1
Copyright (c) 1999 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The end-user documentation included with the redistribution, if any, must include the following acknowledgement:
This product includes software developed by the Apache Software Foundation (http://www.apache.org/).
Alternately, this acknowledgement may appear in the software itself, if and wherever such third-party acknowledgements normally appear.
4. The names “The Jakarta Project”, “Tomcat”, and “Apache Software Foundation” must not be used to endorse or promote products derived from
this software without prior written permission. For written permission, please contact apache@apache.org.
5. Products derived from this software may not be called “Apache” nor may “Apache” appear in their names without prior written permission
of the Apache Group.
THIS SOFTWARE IS PROVIDED ‘‘AS IS’’ AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation. For more information
on the Apache Software Foundation, please see http://www.apache.org/.

ii VERITAS Cluster Server Bundled Agents Reference Guide


Data Encryption Standard (DES)
Support for data encryption in VCS is based on the MIT Data Encryption Standard (DES) under the following copyright:
Copyright © 1990 Dennis Ferguson. All rights reserved.
Commercial use is permitted only if products that are derived from or include this software are made available for purchase and/or use in
Canada. Otherwise, redistribution and use in source and binary forms are permitted.
Copyright 1985, 1986, 1987, 1988, 1990 by the Massachusetts Institute of Technology. All rights reserved.
Export of this software from the United States of America may require a specific license from the United States Government. It is the responsibility
of any person or organization contemplating export to obtain such a license before exporting.
WITHIN THAT CONSTRAINT, permission to use, copy, modify, and distribute this software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice
appear in supporting documentation, and that the name of M.I.T. not be used in advertising or publicity pertaining to distribution of the software
without specific, written prior permission. M.I.T. makes no representations about the suitability of this software for any purpose. It is provided as
is without express or implied warranty.

SNMP Software
SNMP support in VCS is based on CMU SNMP v2 under the following copyright:
Copyright 1989, 1991, 1992 by Carnegie Mellon University
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided
that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting
documentation, and that the name of CMU not be used in advertising or publicity pertaining to distribution of the software without specific,
written prior permission.
CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
OF THIS SOFTWARE.

VERITAS Cluster Server Bundled Agents Reference Guide iii


iv VERITAS Cluster Server Bundled Agents Reference Guide
Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
VCS Enterprise Agents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
Technical Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x

Chapter 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Supported Operating Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Resources and Their Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Modifying Agents and Their Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Categories of Bundled Agents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Chapter 2. Bundled Agents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5


Application Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Type Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Sample Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
DiskGroup Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Setting the noautoimport Flag for a Disk Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Type Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Sample Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
DiskReservation Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Type Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Sample Configuration 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Sample Configuration 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
ElifNone Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

v
Type Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Sample Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
FileNone Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Type Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Sample Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
FileOnOff Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Type Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Sample Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
FileOnOnly Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Type Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Sample Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
IP Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Type Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Sample Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
IPMultiNIC Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Type Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Sample Configuration: IPMultiNIC and MultiNICA . . . . . . . . . . . . . . . . . . . . . . . . 24
Mount Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Type Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Sample Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
MultiNICA Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Type Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Sample Configuration: MultiNICA and IPMultiNIC . . . . . . . . . . . . . . . . . . . . . . . . 30
NFS Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Type Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Sample Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
NIC Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Type Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Sample Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
NotifierMngr Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

vi VERITAS Cluster Serve Bundled Agents Reference Guide


Type Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Sample Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Phantom Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Type Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Sample Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Process Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Type Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Sample Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Proxy Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Type Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Sample Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Samba Agents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Before Using the Samba Agents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Configuring the Samba Agents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
NetBIOS Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
SambaServer Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
SambaShare Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Share Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Type Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Sample Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Volume Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Type Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Sample Configuration 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Sample Configuration 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
VRTSWebApp Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Type Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Sample Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

Appendix A. Optional Bundled Agents (Apache, MySQL) . . . . . . . . . . . . . . . . . . . . . 67


Prerequisite for Apache Web Server Agent:
Changing the httpd Directory Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

Contents vii
Installing Apache Web Server and MySQL Agents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Configuring Apache Web Server and MySQL Agents . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Configuring Agents with Cluster Manager (Java Console) . . . . . . . . . . . . . . . . . . . 69
Configuring Agents with Configuration Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Stopping Apache Web Server and MySQL Agents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Uninstalling Apache Web Server and MySQL Agents . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Apache Web Server Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Type Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Sample Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
MySQL Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Type Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Sample Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

viii VERITAS Cluster Serve Bundled Agents Reference Guide


Preface
This document serves as a reference for VCS agents (including Apache Web Server and
MySQL) bundled with the VCS software.
For information on purchasing VCS agents or other VERITAS products, contact your
VERITAS sales representative:
U.S. and Canadian Customers: 1-800-327-2232
International Customers: +1 (407) 531-7501 or consult the Web (http://www.veritas.com)
for the VERITAS sales office in your area.
Email: sales.mail@veritas.com

VCS Enterprise Agents


VCS enterprise agents are not included with the VCS software, but are sold separately.
Contact your VERITAS sales representative for details on these agents or additional
agents under development:
◆ DB2
◆ Oracle

Technical Support
U.S. and Canada: call 1-800-634-4747.
Europe, the Middle East, or Asia: visit the Technical Support Web site at
http://support.veritas.com for a list of each country’s contact information.
Software updates, TechNotes, product alerts, and hardware compatibility lists, are also
available from http://support.veritas.com.
To learn more about VERITAS and what we offer, visit http://www.veritas.com.

ix
Conventions

Conventions

Typeface/Font Usage

bold names of screens, windows, tabs, dialog boxes, options, buttons

courier computer output, command references within text

courier (bold) command-line user input, keywords in grammar syntax

courier (bold, italic) variables in a command

italic new terms, book titles, emphasis, variables in tables or body text

Symbol Usage

# Superuser prompt

x VERITAS Cluster Server Bundled Agents Reference Guide


Introduction 1
Bundled agents are VCS processes that manage resources of predefined resource types
according to commands received from the VCS engine, HAD. These agents are a part of
VCS, and are installed when VCS is installed. A system has one agent per resource type
that monitors all resources of that type; for example, a single IP agent manages all IP
resources.
When the agent starts, it obtains the necessary configuration information from VCS. The
agent then periodically monitors the resources, and updates VCS with the resource status.
Agents typically:
✔ Bring resources online.
✔ Take resources offline.
✔ Monitor resources and report state changes to VCS.
VCS also bundles agents which control third-party applications. These bundled agents
(Apache Web Server and MySQL) are for optional use and require separate installation
processes from the base VCS product.

Note Refer to the VERITAS Cluster Server User’s Guide for general information on VCS
agents.

Supported Operating Systems


VCS 2.2 supports the following versions of Linux operating system:
◆ Red Hat (Advanced Server 2.1)
◆ SuSE (Version 8)
◆ VmWare ESX (Version 2.0)

1
Resources and Their Attributes

Resources and Their Attributes


Resources are the key parts of a system and are known by their type, such as a disk, a
volume, or an IP address. VCS includes a set of resource types defined in the types.cf
file by a collection of attributes. The VCS configuration file, main.cf, contains the values
for the resource attributes and has an include directive to the types.cf file.
An attribute’s given value configures the resource to function in a specific way. By
modifying the value of a resource attribute, you can change the way the VCS agent
manages the resource. For example, the IP agent monitors an IP address resource. The
specific address to be monitored is identified by the attribute “Address” whose value is
the specific IP address.

Modifying Agents and Their Resources


Use Cluster Manager (Java Console), Cluster Manager (Web Console), or the VCS
command line to dynamically modify the configuration of the resources managed by an
agent. See the VERITAS Cluster Server 2.2 User’s Guide for instructions on how to complete
these tasks.
VCS enables you to edit the main.cf file directly. To implement these changes, make sure
to restart VCS.

Categories of Bundled Agents


VCS enables you to use agents for applications, application control, basic storage,
networking, and VCS infrastructure and support functions:

Application
◆ Apache Web Server
◆ MySQL
◆ Samba (NetBios, SambaServer, SambaShare)

Application Control
◆ Application
◆ Process

2 VERITAS Cluster Server Bundled Agents Reference Guide


Categories of Bundled Agents

Basic Storage
◆ DiskGroup
◆ DiskReservation
◆ Mount
◆ NFS
◆ Share
◆ Volume

Networking
◆ IP
◆ IPMultiNIC
◆ MultiNICA
◆ NIC

VCS Infrastructure and Support


◆ ElifNone
◆ FileNone
◆ FileOnOff
◆ FileOnOnly
◆ NotifierMngr
◆ Phantom
◆ Proxy
◆ VRTSWebApp

Chapter 1, Introduction 3
Categories of Bundled Agents

4 VERITAS Cluster Server Bundled Agents Reference Guide


Bundled Agents 2
This chapter provides a general description and sample configuration for each VCS
bundled agent. The tables in each section include information about entry points, state
definitions, required attributes, and optional attributes.
An entry point is a plug-in that is called when an event occurs within the VCS agent. The
VCS engine uses entry points to manipulate resources. In addition to the online, offline, and
monitor entry points, the clean entry point applies to most agents and is called
automatically by the framework when all ongoing actions associated with a resource must
be terminated and the resource must be taken offline (forcibly, if necessary). Refer to the
VERITAS Cluster Server Agent Developer’s Guide for more information on entry points and
the VCS agent framework.

5
Application Agent

Application Agent

Description Brings applications online, takes them offline, and monitors their status. Enables
you to specify different executables for the online, offline, and monitor routines.
(An application has an executable to start it and an executable to stop it.) The
executables must exist locally on each node.
Applications run in the default context of root. Specify the user name to run an
application in a user context.
The agent starts and stops the application with user-specified programs.
Monitor the application in the following ways:
◆ Use the monitor program
◆ Specify a list of processes to be monitored
◆ Specify a list of process ID files to be monitored
◆ All or some of the above

Entry Points ◆ Online—Runs the StartProgram with the specified parameters in the
specified user context.
◆ Offline—Runs the StopProgram with the specified parameters in the
specified user context.
◆ Monitor—If MonitorProgram is specified, the agent executes the
user-defined MonitorProgram in the user-specified context. If PidFiles is
specified, the routine verifies that the process ID found in each listed file is
running. If MonitorProcesses is specified, the routine verifies that each listed
process is running.
MonitorProgram must return ONLINE to employ any other monitoring
method. Any one, two, or three of the above attributes can be used to
monitor the application. If any one process specified in either PidFiles or
MonitorProcesses is determined not to be running, the monitor returns
OFFLINE.
◆ Clean—Kills all processes specified in PidFiles and MonitorProcesses. If the
CleanProgram is defined, the agent executes the CleanProgram.

State Definitions ONLINE—Indicates that all processes specified in PidFiles and MonitorProcesses
are running and that the MonitorProgram returns ONLINE.
OFFLINE—Indicates that at least one process specified in PidFiles or
MonitorProcesses is not running, or that the MonitorProgram returns OFFLINE.
UNKNOWN—Indicates that the application’s state is indeterminable.

6 VERITAS Cluster Server Bundled Agents Reference Guide


Application Agent

Required Attributes Type and Definition


Dimension

StartProgram string-scalar The executable, created locally on each node, that starts the
application. Specify the complete path of the executable.
Command-line arguments (if applicable) follow the name of
the executable, separated by spaces.

StopProgram string-scalar The executable, created locally on each node, that stops the
application. Specify the complete path of the executable.
Command-line arguments (if applicable) follow the name of
the executable, separated by spaces.

At least one of the see below see below


following attributes:
◆ MonitorProcesses
◆ MonitorProgram
◆ PIDFiles
See descriptions under
Optional Attributes.

Optional Attributes Type and Definition


Dimension

CleanProgram string-scalar The executable, created locally on each node, that forcibly stops
the application. Specify the complete path of the executable.
Command-line arguments (if applicable) follow the name of
the executable, separated by spaces.

MonitorProcesses string-vector List of processes to be monitored and cleaned. Each process


name is the name of an executable. Qualify the executable name
with its complete path if the path is used to start the executable.
The process name must be the name displayed by the ps -ef
command for the process.

MonitorProgram string-scalar The executable, created locally on each node, that will monitor
the application. Specify the complete path of the executable.
Command-line arguments (if applicable) follow the name of
the executable, separated by spaces.
MonitorProgram can return the following VCSAgResState
values: OFFLINE values are 100; ONLINE values are from 101 to
110 (depending on the confidence level); 110 equals confidence
level of 10. The value 99 = UNKNOWN.

Chapter 2, Bundled Agents 7


Application Agent

PidFiles string-vector List of pid files that contain the process ID of the processes to be
monitored and cleaned. These files are application-generated
files. Each PID file contains one PID which will be monitored.
Specify the complete path of each pid file in the list.
The process ID can change when the process restarts. If the
application takes time to update the pid file, the agent’s
monitor script may return an incorrect result. If this occurs,
increase the ToleranceLimit in the resource definition.

User string-scalar User whose id is used to run StartProgram, StopProgram,


MonitorProgram, and CleanProgram. The processes specified
in the MonitorProcesses list must run in the context of the
specified user. Monitor checks the processes to make sure they
run in this context.
Default is "root".

AgentDebug boolean-scalar If set to 1, this flag causes the agent to log additional debug
messages.
Default is 0 (No).

Type Definition
type Application (
static str ArgList[] = { User, StartProgram, StopProgram,
CleanProgram, MonitorProgram,
PidFiles, MonitorProcesses,
AgentDebug }
NameRule = ""
str User
str StartProgram
str StopProgram
str CleanProgram
str MonitorProgram
str PidFiles[]
str MonitorProcesses[]
boolean AgentDebug = 0
)

8 VERITAS Cluster Server Bundled Agents Reference Guide


Application Agent

Sample Configurations
In this example, the executable Samba is configured as StartProgram and StopProgram,
with start and stop specified as command-line arguments respectively. The agent is
configured to monitor two processes: a process specified by the pid smbd.pid, and the
process nmbd.

Application samba_app (
User = "root"
StartProgram = "/usr/sbin/samba start"
StopProgram = "/usr/sbin/samba stop"
PidFiles = { "/var/lock/samba/smbd.pid" }
MonitorProcesses = { "nmbd" }
)
In this example, no user is specified, so the root user will be used. The executable Samba is
used to start and stop the application, with start and stop as the command-line arguments
respectively. The executable sambaMonitor monitors the application and uses all as its
command-line argument. In addition, the processes smbd and nmbd are monitored.
Application samba_app2 (
StartProgram = "/usr/sbin/samba start"
StopProgram = "/usr/sbin/samba stop"
CleanProgram = "/usr/sbin/samba force stop"
MonitorProgram = "/usr/local/bin/sambaMonitor all"
MonitorProcesses = { "smbd", "nmbd" }
)

Chapter 2, Bundled Agents 9


DiskGroup Agent

DiskGroup Agent

Description Brings online, takes offline, and monitors a VERITAS Volume Manager disk group.
This agent uses VERITAS Volume Manager commands.

Entry Points ◆ Online—Imports the disk group using the vxdg command.
◆ Offline—Deports the disk group using the vxdg command.
◆ Monitor—Determines if the disk group is online or offline using the vxdg
command. If the disk group was imported with noautoimport=off, the group
to which the disk group belongs is taken offline (assuming the group is not frozen).
If the monitor hangs, no attempt takes place to take the disk group offline. The
dependent groups can be taken offline (provided the disk group is functional) and
the resnotoff trigger can be called.
◆ Clean—See general description on page 5.

State Definitions ONLINE—Indicates that the disk group is imported.


OFFLINE—Indicates that the disk group is not imported.
UNKNOWN—Indicates that a problem exists either with the configuration or the ability
to determine the status of the resource.

Required Attribute Type and Definition


Dimension

DiskGroup string-scalar Name of the disk group configured with VERITAS Volume
Manager.
For example, diskgroup1.

Optional Attributes Type and Definition


Dimension

StartVolumes string-scalar If set to 1, the DiskGroup online script starts all volumes
belonging to that disk group after importing the group.
Default is 0.

StopVolumes string-scalar If set to 1, the DiskGroup offline script stops all volumes
belonging to that disk group before deporting the group.
Default is 0.

AgentDebug boolean-scalar If set to 1, this flag causes the agent to log additional debug
messages.
Default is 0 (No).

10 VERITAS Cluster Server Bundled Agents Reference Guide


DiskGroup Agent

Setting the noautoimport Flag for a Disk Group


VCS requires that the noautoimport flag of an imported disk group be explicitly set to
“true.” This enables VCS to control the importation and deportation of disk groups as
needed when bringing disk groups online and taking them offline.

Note Be aware that when you enable a disk group configured as a DiskGroup resource
with the noautoimport flag not set to true, VCS forcibly deports the disk group
and reimports it with the noautoimport flag set to true. This can disrupt
applications running on the disk group.

To check the status of this flag for an imported disk group, type the command:
# vxprint -l disk_group | grep noautoimport
If the output from this command is blank, the noautoimport flag is set to false and VCS
lacks the necessary control.
To explicitly set the noautoimport flag to true, deport the disk group and import it with
the -t option as follows:

1. Deport the disk group:


# vxdg deport disk_group

2. Import the disk group, specifying that the noautoimport flag be set, that is, that the
disk group not be automatically imported.
# vxdg -t import disk_group

Chapter 2, Bundled Agents 11


DiskGroup Agent

Type Definition
type DiskGroup (
static int NumThreads = 1
static int OnlineRetryLimit = 1
static str ArgList[] = { DiskGroup, StartVolumes, StopVolumes,
MonitorOnly, AgentDebug }
NameRule = resource.DiskGroup
str DiskGroup
boolean StartVolumes = 0
boolean StopVolumes = 0
boolean AgentDebug = 0
)

Sample Configuration
DiskGroupsharedg (
DiskGroup = sharedg
)

12 VERITAS Cluster Server Bundled Agents Reference Guide


DiskReservation Agent

DiskReservation Agent

Description Reserves and monitors SCSI disks for a system, enabling a resource to go online on
that system. This agent enables you to specify a list of raw disk devices, and reserve
all or a percentage of accessible disks. The reservations prevent disk data corruption
by restricting other nodes from accessing and writing to the disks. The
DiskReservation agent supports all SCSI II disks.
An automatic probing feature allows systems to maintain reservations even when
the disks or bus are reset. The optional FailFast feature minimizes data corruption in
the event of a reservation conflict by causing the system to panic.
Note The DiskReservation agent is not supported with dynamic multipathing
software, such as VERITAS DMP.

Entry Points ◆ Online—Brings the resource online after reserving all or a specified percentage of
accessible disks.
◆ Offline—Releases reservations on reserved disks.
◆ Monitor—Monitors the accessibility and reservation status of the reserved disks.
◆ Clean—See general description on page 5.

State Definitions ONLINE—Indicates that the number of reserved disks is greater than or equal to the
percentage specified in the resource definition.
OFFLINE—Unable to reserve disks.
UNKNOWN—Indicates that a problem exists with the configuration.

Required Attribute Type and Definition


Dimension

Disks string-vector List of raw disk devices. Use the absolute or relative device path
which allows a maximum of 64 characters. A relative path is
assumed to start from the /dev directory.
The order of the disks in the list must be the same across all systems
in the cluster, even if the same device has a different name on
different systems.
Note This attribute can only be altered before bringing a resource
online. An online device must be taken offline before altering
this attribute because disk reservation occurs during the
process of bringing a resource online.

Optional Attributes Type and Definition


Dimension

FailFast boolean-scalar If enabled, FailFast causes the system to panic when a reservation
conflict is detected, thereby reducing the chance of further data
corruption.
Default is 0.

Chapter 2, Bundled Agents 13


DiskReservation Agent

Percentage string-scalar Minimum percentage of configured disks that can be reserved


before a resource can go online. The percentage must be greater
than or equal to 51, and less than or equal to 100.
◆ If the value specified is less than 51, the percentage is set to 51.
◆ If the value specified is greater than 100, the percentage is set to
100.
Default is 100.

ProbeInterval string-scalar Alters the periodicity (in seconds) of the automatic probe function
which checks the reservation status of the disks. The value must be
greater than or equal to three, and less than or equal to 15.
◆ If the value specified is less than 3, the interval is set to 3.
◆ If the value specified is greater than 15, the interval is set to 15.
A lower value for ProbeInterval specifies more frequent probes and
provides for quicker discovery of reservation conflicts. VERITAS
recommends a value is between 3 and 8.
Default is 3.

AgentDebug boolean-scalar If set to 1, this flag causes the agent to log additional debug
messages.
Default is 0 (No).

Type Definition
type DiskReservation (
static str ArgList[] = { Disks, FailFast, Percentage,
ProbeInterval, AgentDebug }
NameRule = ""
str Disks[]
boolean FailFast = 0
int Percentage = 100
int ProbeInterval = 3
boolean AgentDebug = 0
)

14 VERITAS Cluster Server Bundled Agents Reference Guide


DiskReservation Agent

Sample Configuration 1
In this example, a disk is reserved using the DiskReservation agent. The disk is mounted
with the VERITAS File System.

system sysA

system sysB

group groupx (
SystemList = { sysA, sysB }
AutoStartList = { sysA }
)

DiskReservation diskres1 (
Disks = { "/dev/sdc" }
FailFast = 1
)

Mount mount (
MountPoint = "/mnt/tmp"
BlockDevice = "/dev/sdc1"
FSType = vxfs
MountOpt = rw
)

mount requires diskres1

// resource dependency tree


//
//group groupx
//{
//Mount mount
// {
// DiskReservation diskres1
// }
//}

Chapter 2, Bundled Agents 15


DiskReservation Agent

Sample Configuration 2
In this example, several disks are reserved with the DiskReservation agent. The disk
group defined on these disks will be imported only if the disks can be reserved by the
system.
Volumes can be enabled and mounted on the Disk Group. Refer to the Volume agent on
page 61 for a sample configuration.

group groupy (
SystemList = { sysA, sysB }
AutoStartList = { sysA }
)

DiskGroup resdg (
DiskGroup = resdg
)

DiskReservation diskres2 (
Disks = { "/dev/sdc", "/dev/sdd", "/dev/sde", "/dev/sdf",
"/dev/sdg" }
ProbeInterval = 5
Percentage = 60
)

resdg requires diskres2

// resource dependency tree


//
//group groupy
//{
//DiskGroup resdg
// {
// DiskReservation diskres2
// }
//}

16 VERITAS Cluster Server Bundled Agents Reference Guide


ElifNone Agent

ElifNone Agent

Description Monitors a file.

Entry Points Monitor—Checks if the specified file exists. If it does, the agent reports as OFFLINE. If it
does not, the agent reports as ONLINE.

Required Attribute Type and Definition


Dimension

PathName string-scalar Specifies the complete pathname, starting with the slash (/)
preceding the file name.

Optional Attribute Type and Definition


Dimension

AgentDebug boolean-scalar If set to 1, this flag causes the agent to log additional debug
messages.
Default is 0 (No).

Type Definition
type ElifNone (
static int OfflineMonitorInterval = 60
static str ArgList[] = { PathName, AgentDebug }
NameRule = resource.PathName
static str Operations = None
str PathName
boolean AgentDebug = 0
)

Sample Configuration
ElifNOne tmp_file01 (
PathName = "/tmp/file01"
)

Chapter 2, Bundled Agents 17


FileNone Agent

FileNone Agent

Description Monitors a file.

Entry Point Monitor—Checks if the specified file exists. If it does, the agent reports as ONLINE. If it
does not, the agent reports as OFFLINE.

Required Attribute Type and Definition


Dimension

PathName string-scalar Specifies the complete pathname, starting with the slash (/)
preceding the file name.

Optional Attribute Type and Definition


Dimension

AgentDebug boolean-scalar If set to 1, this flag causes the agent to log additional debug
messages.
Default is 0 (No).

Type Definition
type FileNone (
static int OfflineMonitorInterval = 60
static str ArgList[] = { PathName, AgentDebug }
NameRule = resource.PathName
static str Operations = None
str PathName
boolean AgentDebug = 0
)

Sample Configuration
FileNone tmp_file01 (
PathName = "/tmp/file01"
)

18 VERITAS Cluster Server Bundled Agents Reference Guide


FileOnOff Agent

FileOnOff Agent

Description Creates, removes, and monitors files.

Entry Points ◆ Online—Creates an empty file with the specified name (if one does not already
exist).
◆ Offline—Removes the specified file.
◆ Monitor—Checks if the specified file exists. If it does, the agent reports as ONLINE.
If it does not, the agent reports as OFFLINE.
◆ Clean—See general description on page 5.

Required Attribute Type and Definition


Dimension

PathName string-scalar Specifies the complete pathname, starting with the slash (/)
preceding the file name.

Optional Attribute Type and Definition


Dimension

AgentDebug boolean-scalar If set to 1, this flag causes the agent to log additional debug
messages.
Default is 0 (No).

Type Definition
type FileOnOff (
static str ArgList[] = { PathName, AgentDebug }
NameRule = resource.PathName
str PathName
boolean AgentDebug = 0
)

Sample Configuration
FileOnOff tmp_file01 (
PathName = "/tmp/file01"
)

Chapter 2, Bundled Agents 19


FileOnOnly Agent

FileOnOnly Agent

Description Creates and monitors files.

Entry Points ◆ Online—Creates an empty file with the specified name (if one does not already
exist).
◆ Monitor—Checks if the specified file exists. If it does, the agent reports as ONLINE.
If it does not, the agent reports as OFFLINE.
◆ Clean—See general description on page 5.

Required Attribute Type and Definition


Dimension

PathName string-scalar Specifies the complete pathname, starting with the slash (/)
preceding the file name.

Optional Attribute Type and Definition


Dimension

AgentDebug boolean-scalar If set to 1, this flag causes the agent to log additional debug
messages.
Default is 0 (No).

Type Definition
type FileOnOnly (
static str ArgList[] = { PathName, AgentDebug }
NameRule = resource.PathName
static str Operations = OnOnly
str PathName
boolean AgentDebug = 0
)

Sample Configuration
FileOnOnly tmp_file02 (
PathName = "/tmp/file02"
)

20 VERITAS Cluster Server Bundled Agents Reference Guide


IP Agent

IP Agent

Description Manages the process of configuring a virtual IP address and its subnet mask on an
interface. The interface must be plumbed with a physical (or administrative) base IP
address before a virtual IP address can be assigned. The virtual IP address must not
be the one currently in use.

Entry Points ◆ Online—Checks if the IP address is in use by another system. Uses ifconfig to
set the IP address on a unique alias on the interface.
◆ Offline—Brings down the IP address associated with the specified interface.
◆ Monitor—Monitors the interface to test if the IP address associated with the
interface is alive.

State Definitions ONLINE—Indicates that the device is up and the specified IP address is assigned to
the device. Sends out a gratuitous ARP.
OFFLINE—Indicates that the device is down or the specified IP address is not
assigned to the device.
UNKNOWN—Indicates that the device name or the IP address is not specified in the
configuration file (main.cf).

Required Attributes Type and Definition


Dimension

Address string-scalar Virtual IP address associated with the interface. (The virtual IP
address is different from the base and administrative IP
addresses of the interface.)
For example, "172.29.9.24".

Device string-scalar Name of the NIC device associated with the IP address.
Requires the device name without an alias.
For example, specify eth0 to assign the IP address to eth0:1. Use
ifconfig -a to display a list of NICs that are up and the IP
addresses assigned to each NIC.

Optional Attributes Type and Definition


Dimension

NetMask string-scalar Subnet mask associated with the IP address. The value of
NetMask must be specified in decimal (base 10).
For example, "255.255.255.0".
Note If Netmask is not specified or an incorrect netmask is
specified, the agent uses a default netmask based on the
class of the IP address.

Chapter 2, Bundled Agents 21


IP Agent

Options string-scalar Options for the ifconfig command.


For example, "broadcast 172.20.9.255".

AgentDebug boolean-scalar If set to 1, this flag causes the agent to log additional debug
messages.
Default is 0 (No).

Type Definition
type IP (
static str ArgList[] = { Device, Address, NetMask, Options,
AgentDebug }
NameRule = IP_ + resource.Address
str Device
str Address
str NetMask
str Options
boolean AgentDebug = 0
)

Sample Configurations

Sample 1
IP IP_192_203_47_61 (
Device = eth0
Address = "192.203.47.61"
)

Sample 2 (using specified NetMask)


IP IP_192_203_47_61 (
Device = eth0
Address = "192.203.47.61"
NetMask = "255.255.248.0"
)

22 VERITAS Cluster Server Bundled Agents Reference Guide


IPMultiNIC Agent

IPMultiNIC Agent

Description Represents a virtual (logical) IP address configured as an alias on one interface of a


MultiNICA resource. This agent monitors the logical IP address. If the interface is
faulted, the IPMultiNIC agent works with the MultiNICA resource to fail over to a
backup interface. If multiple service groups have IPMultiNICs associated with the
same MultiNICA resource, only one group will have the MultiNICA resource. The
other groups will have Proxy resources pointing to it.

Entry Points ◆ Online—Configures a virtual IP address on one interface of the MultiNICA


resource.
◆ Offline—Removes a virtual IP address from one interface of the MultiNICA
resource.
◆ Monitor—Checks if the virtual IP address is configured on one interface of the
MultiNICA resource.

State Definitions ONLINE—Indicates that the specified IP address is assigned to the device. Sends out a
gratuitous ARP.
OFFLINE—Indicates that the specified IP address is not assigned to the device.
UNKNOWN—Indicates that the IP address is not specified in the configuration file
(main.cf).

Required Attributes Type and Definition


Dimension

Address string-scalar Virtual IP address assigned to the active NIC.


For example, "172.29.9.100".

MultiNICAResName string-scalar Name of associated MultiNICA resource that determines the


active NIC.
For example, MultiNICA_grp1.

NetMask string-scalar Netmask for the virtual IP address. The value of NetMask must
be specified in decimal (base 10).
For example, "255.255.255.0".

Optional Attribute Type and Definition


Dimension

Options string-scalar The ifconfig options for the virtual IP address.


For example, "mtu m".

Chapter 2, Bundled Agents 23


IPMultiNIC Agent

Type Definition
type IPMultiNIC (
static str ArgList[] = { "MultiNICAResName:Device", Address,
NetMask, MultiNICAResName, Options,
"MultiNICAResName:Probed" }
NameRule = IPMultiNIC_ + resource.Address
static int MonitorTimeout = 200
str Address
str MultiNICAResName
str NetMask
str Options
boolean AgentDebug = 0
)

Sample Configuration: IPMultiNIC and MultiNICA


For more information on this example, refer to “Sample Configuration: MultiNICA and
IPMultiNIC” on page 30.
cluster foo (
UserNames = { admin = "cDRpdxPmHpzS." }
CounterInterval = 5
)
system vcslx3 (
)
system vcslx4 (
)
group grp1 (
SystemList = { vcslx3 = 1, vcslx4 = 2 }
)

IPMultiNIC ip1 (
Address = "10.128.10.177"
MultiNICAResName = mnic
NetMask = "255.255.248.0"
)

MultiNICA mnic (
Device @vcslx3 = { eth0 = "10.128.10.127", eth1 =
"10.128.11.127" }
Device @vcslx4 = { eth0 = "10.128.10.128", eth2 =
"10.128.11.128" }
NetMask = "255.255.248.10"
NetworkHosts = { "10.128.10.129", "10.128.10.130" }
)

24 VERITAS Cluster Server Bundled Agents Reference Guide


IPMultiNIC Agent

ip1 requires mnic

// resource dependency tree


//
// group grp1
// {
// IPMultiNIC ip1
// {
// MultiNICA mnic
// }
// }

Chapter 2, Bundled Agents 25


Mount Agent

Mount Agent

Description Brings online, takes offline, and monitors a file system mount point. Mounts block
devices or volumes.

Entry Points ◆ Online—Mounts a block device on the directory. If the mount process fails, the
agent attempts to run fsck on the raw device before attempting to remount the
block device.
◆ Offline—Unmounts the file system.
◆ Monitor—Determines if the file system is mounted.
◆ Clean—See general description on page 5.

State Definitions ONLINE—Indicates that the block device is mounted on the specified mount point.
OFFLINE—Indicates that the block device is not mounted on the specified mount point.
UNKNOWN—Indicates that a problem exists with the configuration.

Required Attributes Type and Definition


Dimension

BlockDevice string-scalar Device for mount point. For example, "/dev/sdc1".

MountPoint string-scalar Directory for mount point. For example, "/mnt/apache1".

FsckOpt string-scalar Options for fsck command. If the mount process fails, fsck runs
with the specified options before attempting to remount the block
device. FsckOpt is a mandatory attribute and its value can be -y or
-n.

Optional Attributes Type and Definition


Dimension

FSType string-scalar The file system type can be vxfs, ext2, or ext3.
Default is vxfs.

MountOpt string-scalar Options for mount command.


For example, -w.
Note Do not specify "-o" in the MountOpt field.

SnapUmount boolean-scalar If set to 1, this attribute automatically unmounts VxFS snapshots


when the file system is unmounted.
Default is 0 (No).

AgentDebug boolean-scalar If set to 1, this flag causes the agent to log additional debug
messages.
Default is 0 (No).

26 VERITAS Cluster Server Bundled Agents Reference Guide


Mount Agent

Type Definition
type Mount (
static str ArgList[] = { MountPoint, BlockDevice, FSType, MountOpt,
FsckOpt, SnapUmount, AgentDebug }
NameRule = resource.MountPoint
str MountPoint
str BlockDevice
str FSType
str MountOpt
str FsckOpt
boolean SnapUmount = 0
boolean AgentDebug = 0
)

Sample Configuration
Mount MountSCSI1 (
MountPoint= "/scsi1"
BlockDevice = "/dev/sda1"
FSType = vxfs
FsckOpt = “-n”
MountOpt = rw
)

Chapter 2, Bundled Agents 27


MultiNICA Agent

MultiNICA Agent

Description Represents a set of network interfaces, and provides failover capabilities between them.
Each interface in a MultiNICA resource must have a unique base IP address. The
MultiNICA agent configures one interface at a time. If the agent does not detect activity
on the configured interface, it configures a new interface and migrates IP aliases to that
interface.
If an interface is associated with a MultiNICA resource, it should not be associated with
any other MultiNICA or NIC resource. If the same set of interfaces must be a part of
multiple service groups, configure 1) a MultiNICA resource in one of the service groups,
and 2) Proxy resources that point to the MultiNICA resource in the other service groups.

Entry Point ◆ Online—Not applicable.


◆ Offline—Not applicable.
◆ Monitor—Uses Medium Independent Interface (Mii) to request the device status. If
the hardware does not respond, the agent sends a ping to the hosts listed in the
NetworkHosts attribute. If the ping test fails, the agent checks for activity on a
configured interface by sampling input packets received on that interface. If the
agent does not detect activity, it forces activity by sending out a broadcast ping. If the
agent does not receive a network reply, it migrates to the next interface.

Required Attributes Type and Definition


Dimension

Device string-association List of devices and associated base IP addresses. This attribute must
be specified separately for each system in the SystemList. The first
device that the agent determines is “up” will become the active
device that is assigned a corresponding IP address.
For example,
Device@vcslinux1={eth1 = "10.212.100.178", eth2 = "10.212.102.178"}
Device@vcslinux2 ={eth2 = "10.212.100.179", eth3 = "10.212.102.179"}
Note If all the NICs configured in the Device attribute are down, the
MultiNICA agent will fault the resource after a 2-3 minute
interval. This delay occurs because the MultiNICA agent tests
the failed NIC several times before marking the resource
offline. Messages recorded in the engine log during failover
provide a detailed description of the events that take place
during failover. (The engine log is located in
/var/VRTSvcs/log/engine_A.log.)

NetMask string-scalar Netmask associated with the base IP address. The value must be
specified in decimal (base 10).

28 VERITAS Cluster Server Bundled Agents Reference Guide


MultiNICA Agent

Optional Attributes Type and Definition


Dimension

FailoverInterval integer-scalar Interval in seconds to wait to check if the NIC is active. This is only
used during failover. During this interval, ping requests are sent out
to determine if the NIC is active. If the NIC is not active, the next
NIC in the Device list is tested.
Default is 60.

FailoverPingCount integer-scalar Number of times to send ping requests during the FailoverInterval.
Default is 4.

NetworkHosts string-vector List of hosts on the network that will receive pings to determine the
state of the NICs. Specify the IP address of the host, not the host
name. Include hosts that can be reached by all the NICs in the
Device list. If more than one network host is listed, monitor will
return ONLINE if the ping test is successful with at least one of the
hosts.

Options string-scalar The ifconfig options involved while assigning the base IP
address to the active device.
For example, "trailers".

PingOptimize integer-scalar Determines whether or not a broadcast ping is sent prior to checking
network statistics, which are used to determine the state of the NIC
(if Mii is not supported and the ping to NetworkHosts does not
confirm the NIC is up.)
A value of 1 indicates a broadcast ping will not occur; a value of 0
indicates a broadcast ping will occur.
Default is 1.

RouteOptions string-scalar Assignment of a base IP address to a device is followed by a route


add command with the options specified for this attribute.
RouteOptions are applicable only when configuring the local host as
the default gateway. No routes are added if this string is set to NULL.
For example, "default 166.98.16.103.0".

AgentDebug boolean-scalar If set to 1, this flag causes the agent to log additional debug
messages.
Default is 0 (No).

Chapter 2, Bundled Agents 29


MultiNICA Agent

Type Definition
type MultiNICA (
static str ArgList[] = { Device, NetMask,Options, RouteOptions,
PingOptimize, MonitorOnly,
FailoverInterval, FailoverPingCount,
NetworkHosts, AgentDebug }
NameRule = MultiNICA_ + group.Name
static int MonitorTimeout = 240
static str Operations = None
str Device[]
str NetMask
str Options
str RouteOptions
int PingOptimize = 1
int FailoverInterval = 60
int FailoverPingCount = 4
str NetworkHosts[]
boolean AgentDebug = 0
)

Sample Configuration: MultiNICA and IPMultiNIC


In this example, two machines (vcslx3 and vcslx4) each have a pair of network interfaces
(eth0 and eth1, eth0 and eth2). These interfaces have different physical IP addresses.
The MultiNICA resource fails over only the physical IP address to the backup NIC in the
event of a failure. The logical IP addresses are configured by the IPMultiNIC agent. The
resource ip1 has the Address attribute, which contains the logical IP address. In the event
of a NIC failure on vcslx3, the physical IP address and the logical IP address will fail over
from eth0 to eth1. In the event that eth1 fails, the address will fail back to eth0 if eth0 is
reconnected.
However, if both the NICs on vcslx3 are disconnected, the MultiNICA and IPMultiNIC
resources work in tandem to fault the group on vcslx3. The entire group fails over to
vcslx4.
If you have more than one group using the MultiNICA resource, the second group can use
a Proxy resource to point to the MultiNICA resource in the first group. This prevents
redundant monitoring of the NICs on the same system. The IPMultiNIC resource is
always made dependent on the MultiNICA resource. Refer to “IPMultiNIC Agent” on
page 23.

30 VERITAS Cluster Server Bundled Agents Reference Guide


MultiNICA Agent

cluster foo (
UserNames = { admin = "cDRpdxPmHpzS." }
CounterInterval = 5
)
system vcslx3 (
)
system vcslx4 (
)
group grp1 (
SystemList = { vcslx3 = 1, vcslx4 = 2 }
)

IPMultiNIC ip1 (
Address = "10.128.10.177"
MultiNICAResName = mnic
NetMask = "255.255.248.0"
)

MultiNICA mnic (
Device @vcslx3 = { eth0 = "10.128.10.127", eth1 =
"10.128.11.127" }
Device @vcslx4 = { eth0 = "10.128.10.128", eth2 =
"10.128.11.128" }
NetMask = "255.255.248.0"
NetworkHosts = { "10.128.10.129", "10.128.10.130" }
)

ip1 requires mnic

// resource dependency tree


//
// group grp1
// {
// IPMultiNIC ip1
// {
// MultiNICA mnic
// }
// }

Chapter 2, Bundled Agents 31


NFS Agent

NFS Agent

Description Starts and monitors the nfsd, mountd, lockd, and statd processes. Only one resource of
this type is permitted.

Entry Points ◆ Online—Checks if nfsd and mountd processes are running. If they are not
running, the agent starts the processes and exits.
◆ Offline—Not applicable.
◆ Monitor—Monitors versions 2 and 3 of the nfsd process, versions 1, 2, and 3 of the
mountd process, versions 1, 3, and 4 of the lockd process, and version 1 of the statd
process.
Monitors tcp and udp versions of the processes by sending RPC (Remote
Procedure Call) calls clnt_create and clnt_call to the RPC server. If the calls
succeed, the resource is reported as online.
◆ Clean—See general description on page 5.

State Definitions ONLINE—Indicates that the NFS daemons are running properly.
OFFLINE—Indicates that the NFS daemons are not running properly.
UNKNOWN—Unable to determine the status of the NFS daemons.

Optional Attributes Type and Definition


Dimension

Nproc integer-scalar Number of threads of nfsd that have to be started.


Default is 8.

AgentDebug boolean-scalar If set to 1, this flag causes the agent to log additional debug
messages.
Default is 0 (No).

32 VERITAS Cluster Server Bundled Agents Reference Guide


NFS Agent

Type Definition
type NFS (
static int RestartLimit = 1
static str ArgList[] = { Nproc, AgentDebug }
NameRule = NFS_ + group.Name + "_" + resource.Nproc
static str Operations = OnOnly
int Nproc = 8
boolean AgentDebug = 0
)

Sample Configuration
Note Refer to the configuration for Share Agent on page 58 for more information.

NFS NFS_groupx_24 (
Nservers = 24
)

Chapter 2, Bundled Agents 33


NIC Agent

NIC Agent
Before using this agent:

✔ Verify that each NIC has the correct administrative IP address and subnet mask.
✔ Verify that each NIC does not have built-in failover support. If it does, disable it. (If
necessary, refer to the NIC documentation.)

Description Monitors the configured NIC. If a network link fails, or if a problem arises
with the adapter, the resource is marked OFFLINE.
Some NICs maintain their connection status in a hardware register. For
NICs that maintain their connection status, the agent uses Mii to determine
the status of the NIC resource. For NICs that do not maintain their
connection status, the agent uses a ping or a broadcast to determine the
status of the resource.

Entry Points ◆ Online—Not applicable.


◆ Offline—Not applicable.
◆ Monitor—If the NIC maintains its connection status, the agent uses Mii
to determine the status of the resource.
If the NIC does not maintain its connection status, the agent verifies that the
NIC is configured and sends a ping to all the hosts listed in the
NetworkHosts attribute. If the ping test is successful, it marks the NIC
resource ONLINE.
If the NetworkHosts list is empty, or the ping test fails, the agent counts the
number of packets received by the NIC and compares the count with a
previously stored value. If the packet count increases, the resource is
marked ONLINE. If the count remains unchanged, the agent sends a ping to
the broadcast address of the device to generate traffic on the network.
The agent counts the number of packets received by the NIC before and
after the broadcast. If the count increases, the resource is marked ONLINE. If
the count remains the same or decreases over a period of five broadcast
cycles, the resource is marked OFFLINE.

State Definitions ONLINE—Indicates that the NIC resource is online.


OFFLINE—Indicates that the NIC resource is offline.
UNKNOWN—Indicates that the device is not configured or is configured
incorrectly.

34 VERITAS Cluster Server Bundled Agents Reference Guide


NIC Agent

Required Type and Definition


Attribute Dimension

Device string-scalar Name of the NIC to be monitored. For example, eth0,


eth1. Use ifconfig -a to list all network adapters and
the IP addresses assigned to each NIC.

Optional Type and Definition


Attributes Dimension

PingOptimize integer-scalar Flag that defines whether the agent sends a broadcast
ping before retrieving the received packet statistics. This
attribute is used when Mii is not set and no network
hosts are specified.
If this flag is set to 1, the agent will retrieve received
packet statistics from the netstat command and
compare them with previously stored values. The agent
sends a broadcast ping to the network only if the packet
count remains unchanged.
If this flag is set to 0, the agent sends a broadcast ping
before checking the network statistics.
Default is 1.

Mii integer-scalar Flag that defines whether the NIC maintains its
connection status.
If this flag is set to 1, Mii uses hardware registers,
instead of the ping and packet count method, to
determine the health of the network card.
If the flag is set to 0, the agent does not use Mii to
monitor the status of the NIC.
Default is 1.

NetworkHosts string-vector List of hosts on the network. If network hosts are


specified and Mii is not set, the agent will send pings to
the hosts to check whether the device is online.

AgentDebug boolean-scalar If set to 1, this flag causes the agent to log additional
debug messages.
Default is 0 (No).

Chapter 2, Bundled Agents 35


NIC Agent

Type Definition
type NIC (
static int OfflineMonitorInterval = 60
static str ArgList[] = { Device, PingOptimize, Mii, NetworkHosts,
AgentDebug }
NameRule = group.Name + "_" + resource.Device
static str Operations = None
str Device
int PingOptimize = 1
int Mii = 1
str NetworkHosts[]
boolean AgentDebug = 0
)

Sample Configurations

Sample 1: Using Mii

Note If the NIC does not respond to Mii, the agent will use network statistics to monitor
the device.

NIC groupx_eth0 (
Device = eth0
Mii = 1
PingOptimize = 1
)

Sample 2: Using Network Hosts


NIC groupx_eth0 (
Device = eth0
NetworkHosts = { "166.93.2.1", "166.99.1.2" }
)

36 VERITAS Cluster Server Bundled Agents Reference Guide


NotifierMngr Agent

NotifierMngr Agent

Description Starts, stops, and monitors a notifier process, making it highly available. The notifier
process manages the reception of messages from VCS and GCM and the delivery of
those messages to SNMP consoles and SMTP servers. See the VERITAS Cluster Server
User’s Guide for a description of types of events that generate notification. See the
notifier(1) man page to configure notification from the command line.
Note The attributes of the NotifierMngr agent cannot be dynamically changed using
the hares -modify command. Changes made using this command are
effective after notifier is restarted.

Entry Points ◆ Online—Starts the notifier process with its required arguments.
◆ Offline—VCS sends a SIGABORT. If the process does not exit within one second,
VCS sends a SIGKILL.
◆ Monitor—Monitors the notifier process.
◆ Clean—Sends SIGKILL.

State Definitions ONLINE—Indicates that the Notifier process is running.


OFFLINE—Indicates that the Notifier process is not running.

Required Attributes Type and Definition


Dimension

PathName string-scalar Complete pathname to access the notifier process. PathName must
not exceed 80 characters.
Default is /opt/VRTSvcs/bin/notifier.

SnmpConsoles string- Specifies the machine name of the SNMP manager and the severity
association level of the messages to be delivered to the SNMP manager. The
severity levels of messages are Information, Warning, Error,
SevereError. Specifying a given severity level for messages generates
delivery of all messages of equal or higher severity.
For example,
"172.29.10.89" = Error, "172.29.10.56" = Information
Note SnmpConsoles is a required attribute if SmtpServer is not
specified; otherwise, SnmpConsoles is an optional attribute. The
user can specify both SnmpConsoles and SmtpServer if
necessary.

SmtpServer string-scalar Specifies the machine name of the SMTP server.


Note SmtpServer is a required attribute if SnmpConsoles is not
specified; otherwise, SmtpServer is an optional attribute. The
user can specify both SmtpServer and SnmpConsoles if
necessary.

Chapter 2, Bundled Agents 37


NotifierMngr Agent

Optional Attributes Type and Definition


Dimension

MessagesQueue integer-scalar Size of the VCS engine’s message queue.


Default is 30.

NotifierListeningPort integer-scalar Any valid TCP/IP port numbers that are not used.
Default is 14144.

SnmpdTrapPort integer-scalar Port to which SNMP traps are sent. The value specified for this
attribute is used for all consoles if more than one SNMP console is
specified.
Default is 162.

SnmpCommunity string-scalar Specifies the community ID for the SNMP manager.


Default is "public".

SmtpRecipients string- Specifies the email address to which information is sent and the
association severity level of the messages to be received. The severity levels of
messages are Information, Warning, Error, SevereError. Specifying a
given severity level for messages indicates that all messages of equal
or higher severity will be received.
For example,
"james@veritas.com" = SevereError, "admin@veritas.com" = Warning
Note SmtpRecipients is a required attribute if SmtpServer is specified.

38 VERITAS Cluster Server Bundled Agents Reference Guide


NotifierMngr Agent

Type Definition
type NotifierMngr (
static int RestartLimit = 3
static str ArgList [] = { PathName, MessagesQueue,
NotifierListeningPort, SnmpdTrapPort,
SnmpCommunity, SnmpConsoles,
SmtpServer, SmtpRecipients,
AgentDebug }
NameRule = resource.PathName
str PathName = "/opt/VRTSvcs/bin/notifier"
int MessagesQueue = 30
int NotifierListeningPort = 14144
int SnmpdTrapPort = 162
str SnmpCommunity = "public"
str SnmpConsoles{}
str SmtpServer
str SmtpRecipients{}
boolean AgentDebug = 0
)

Sample Configuration
In the following configuration, the NotifierMngr agent is configured to run with two
resource groups, NicGrp and Grp1. NicGrp contains the NIC resource and a Phantom
resource that enables VCS to determine the online and offline status of the group. (See
“Phantom Agent” on page 41 for more information on verifying the status of groups that
only contain OnOnly or Persistent resources (such as the NIC resource). NicGrp must be
enabled to run as a parallel group on both systems.
Grp1 contains the NotifierMngr resource (ntfr) and a Proxy resource (nicproxy),
configured for the NIC resource in the first group. In this example, NotifierMngr has a
dependency on the Proxy resource.

Note Only one instance of the notifier process can run in a cluster; the process cannot run
in a parallel group.

The NotifierMngr resource sets up notification for all events to the SnmpConsole
(snmpserv). In this example, only messages of SevereError level are sent to the
SmptServer (smtp.your_company.com), and the recipient,
(vcsadmin@your_company.com).

Chapter 2, Bundled Agents 39


NotifierMngr Agent

system north

system south

group NicGrp (
SystemList = { north, south}
AutoStartList = { north }
Parallel = 1
)

Phantom my_phantom (
)

NIC NicGrp_eth0 (
Enabled = 1
Device = eth0
)

group Grp1 (
SystemList = { north, south }
AutoStartList = { north }
)

Proxy nicproxy(
TargetResName = "NicGrp_eth0"
)

NotifierMngr ntfr (
PathName = "/opt/VRTSvcs/bin/notifier"
SnmpConsoles = { snmpserv = Information }
SmtpServer = "smtp.your_company.com"
SmtpRecipients = { "vcsadmin@your_company.com" = SevereError }
)

ntfr requires nicproxy

// resource dependency tree


//
// group Grp1
// {
// NotifierMngr ntfr
// {
// Proxy nicproxy
// }
// }

40 VERITAS Cluster Server Bundled Agents Reference Guide


Phantom Agent

Phantom Agent

Description Enables VCS to determine the status of parallel service groups that do not include
OnOff resources (resources that VCS can start and stop as required). Without the
"dummy" resource provided by this agent, VCS cannot assess the status of groups that
only contain None (Persistent) and OnOnly resources because the state of these
resources is not considered in the process of determining whether a group is online.
Refer to the VERITAS Cluster Server User’s Guide for information on categories of
service groups and resources.

Entry Point ◆ Monitor—Determines status based on the status of the group.

Optional Attribute Type and Definition


Dimension

AgentDebug boolean-scalar If set to 1, this flag causes the agent to log additional debug
messages.
Default is 0 (No).

Type Definition
type Phantom (
static str ArgList[] = { AgentDebug }
NameRule = Phantom_ + group.Name
boolean AgentDebug = 0
)

Sample Configurations

Sample 1
Phantom (
)

Chapter 2, Bundled Agents 41


Phantom Agent

Sample 2
The following example shows a complete configuration file (main.cf), in which the
FileNone resource and the Phantom resource are in the same group.
include "types.cf"

cluster PhantomCluster

system sysa

system sysb

group phantomgroup (
SystemList = { sysa, sysb }
AutoStartList = { sysa }
Parallel = 1
)

FileNone my_file_none (PathName = "/tmp/file_none"


)
Phantom my_phantom (
)

// resource dependency tree


//
// group maingroup
// {
// Phantom my_Phantom
// FileNone my_file_none
// }

42 VERITAS Cluster Server Bundled Agents Reference Guide


Process Agent

Process Agent

Description Starts, stops, and monitors a user-specified process.

Entry Points ◆ Online—Starts a process in the background with optional arguments and
priority in the specified user context.
◆ Offline—Terminates the process with a SIGTERM. If the process does not exit,
VCS sends a SIGKILL.
◆ Monitor—Checks to see if the process is alive by scanning the process table for
the name of the executable pathname and argument list.
◆ Clean—See general description on page 5.

State Definitions ONLINE—Indicates that the specified process is running in the specified user context.
OFFLINE—Indicates that the specified process is not running in the specified user
context.
UNKNOWN—Indicates that the agent could not determine the state of the resource.

Required Attribute Type and Definition


Dimension

PathName string-scalar Complete path name to access the executable of the


process. This path includes the program name.
For example, /usr/sbin/proc1.

Optional Attributes Type and Definition


Dimension

Arguments string-scalar Arguments to the process. Multiple arguments must be


separated by a single space.

UserName string-scalar Owner of the process. The process runs with the user ID.
Default is root.

Priority string-scalar Priority with which the process will run. Priority values
range between -20 (highest) to +19 (lowest).
Default is 10.

PidFile string-scalar File containing the process ID that affects the monitoring
process. If PidFile is specified, the monitoring process is
based on the Pid. Otherwise, the ps output is used to
complete the monitoring process.
For example, /var/lock/sendmail.pid.

Chapter 2, Bundled Agents 43


Process Agent

AgentDebug boolean-scalar If set to 1, this flag causes the agent to log additional
debug messages.
Default is 0 (No).

Type Definition
type Process (
static str ArgList[] = { PathName, Arguments, UserName, Priority,
PidFile, AgentDebug }
NameRule = ""
str PathName
str Arguments
str UserName = root
str Priority = 10
str PidFile
boolean AgentDebug = 0
)

Sample Configuration
In this example, the Process agent starts, stops, and monitors sendmail. This process is
started with two arguments as determined in the Arguments attribute. The pid stored in
the PidFile attribute is used to monitor the sendmail process.

system sysA

system sysB

Process sendmail (
PathName = "/usr/sbin/sendmail"
Arguments = "-bd -q30m"
PidFile = "/var/run/sendmail.pid"
)

44 VERITAS Cluster Server Bundled Agents Reference Guide


Proxy Agent

Proxy Agent

Description Mirrors the state of another resource on a local or remote system. Provides a means to
specify and modify one resource and have it reflected by its proxies.

Entry Point ◆ Monitor—Determines status based on the target resource status.

Required Attribute Type and Definition


Dimension

TargetResName string-scalar Name of the target resource whose status is mirrored by Proxy
resource. The target resource must be in a different resource group
from the Proxy resource.

Optional Attributes Type and Definition


Dimension

TargetSysName string-scalar Mirrors the status of the TargetResName on system specified by the
TargetSysName variable. If attribute is not specified, Proxy
resource assumes the system is local.

AgentDebug boolean-scalar If set to 1, this flag causes the agent to log additional debug
messages.
Default is 0 (No).

Type Definition
type Proxy (
static int OfflineMonitorInterval = 60
static str ArgList[] = { TargetResName, TargetSysName,
"TargetResName:Probed",
"TargetResName:State", AgentDebug
}
NameRule = Proxy_ + resource.TargetResName
static str Operations = None
str TargetResName
str TargetSysName
boolean AgentDebug = 0
)

Chapter 2, Bundled Agents 45


Proxy Agent

Sample Configurations

Sample 1
// Proxy resource to mirror the state of the resource
// tmp_VRTSvcs_file1 on the local system.

Proxy proxy1(
TargetResName = "tmp_VRTSvcs_file1"
)

Sample 2
// Proxy resource to mirror the state of the resource
// tmp_VRTSvcs_file1 on sys1.

Proxy proxy1(
TargetResName = "tmp_VRTSvcs_file1"
TargetSysName = "sys1"
)

Sample 3
// Proxy agent to mirror the state of the resource mnic on
// the local system; note that target resource is in grp1,
// proxy in grp2; a target resource and its proxy cannot be in
// the same group.

group grp1 (
SystemList = { sysa, sysb }
AutoStartList = { sysa }
)

MultiNICA mnic (
Device @vcslx3 = { eth0 = "10.128.8.42", eth3 =
"10.128.8.42" }
Device @vcslx4 = { eth0 = "10.128.8.43", eth3 (=
"10.128.8.43" }
NetMask = "255.255.248.0"
NetworkHosts = { "10.128.10.129", "10.128.10.130" }
)

IPMultiNIC ip1 (

46 VERITAS Cluster Server Bundled Agents Reference Guide


Proxy Agent

Address = "10.128.10.177"
MultiNICAResName = mnic
NetMask = "255.255.248.0"
)

ip1 requires mnic

group grp2 (
SystemList = { sysa, sysb }
AutoStartList = { sysa }
)

IPMultiNIC ip2 (
Address = "10.128.10.178"
NetMask = "255.255.255.0"
MultiNICAResName = mnic
)
Proxy proxy (
TargetResName = mnic
)
ip2 requires proxy

Chapter 2, Bundled Agents 47


Samba Agents

Samba Agents
Samba is a suite of programs that allows a machine running a UNIX or UNIX-like
operating system to provide services using the Microsoft network protocol. Samba
provides the following services:
◆ Filespace
◆ Printer
◆ WINS
◆ Domain Master
These services are configured in the Samba configuration file (smb.conf). Samba uses
two processes: smbd and nmbd to provide these services.
VCS provides Samba failover using three agents: SambaServer, NetBios, and SambaShare.
Each of these agents is described in detail beginning page 50.

Before Using the Samba Agents


✔ Verify that smbd and nmbd always run as daemons. Verify that they cannot start
using meta-daemon inetd.
✔ Verify that the smbd and nmbd daemons are in the path environment variable. If they
are not, verify that they run from the default directory /usr/bin.
✔ Verify that Samba is configured properly and that the Samba configuration file is
identical on all cluster systems. The user can replicate the file or store it on a shared
disk accessible from all cluster systems.
✔ If configuring Samba as a WINS server or Domain Master, verify that the Samba lock
directory is on the shared disk. This ensures that the WINS server database and
Domain Master are created on the shared disk.

48 VERITAS Cluster Server Bundled Agents Reference Guide


Samba Agents

Configuring the Samba Agents


If Samba is configured properly, and the configuration file is identical on all cluster
systems, configure resources of type SambaServer and NetBios only. This ensures that all
shares in the Samba configuration file are failed over when the SambaServer resource fails
over. Note that the Samba shares are not monitored. To monitor the Samba shares,
configure the agents with the following dependencies:
SambaShare requires NetBios
SambaShare requires SambaServer
NetBios requies IP
For example, use the following configuration to monitor Samba shares SambaShare1 and
SambaShare2. Use multiple resources of type SambaShare (if necessary), but only one
resource each of type NetBios and SambaServer.
SambaShare1 requires NetBios1
SambaShare1 requires SambaServer1
SambaShare2 requires NetBios1
SambaShare2 requires SambaServer1
NetBios1 requies IP_1

Chapter 2, Bundled Agents 49


Samba Agents

NetBIOS Agent
Before using this agent:
✔ Set the NetBIOS name.
✔ Set the NetBIOS interface.

Description Starts, stops, and monitors the nmbd daemon. Only one resource of this
type is permitted.
The agent sets, monitors, and resets the names and network interfaces
by which the Samba server is known. The agent also sets, monitors and
resets Samba to act as a WINS server or domain master or both.
Note that nmbd broadcasts the NetBIOS name, or the name by which the
Samba server is known in the network.

Entry Points ◆ Online—Updates the Samba configuration with the NetBIOS name,
all NetBIOS aliases and network interfaces, WINS support, and
domain master options specified in the NetBIOS resource. Starts the
nmbd daemon.
◆ Offline—Removes the NetBIOS name, all NetBIOS aliases and
network interfaces, WINS support, and domain master options
specified in the NetBIOS resource from the Samba configuration file.
Stops the nmbd daemon.
◆ Monitor—Verifies that the Samba configuration contains the
NetBIOS name, all NetBIOS aliases and network interfaces, WINS
support, and domain master options specified in the NetBIOS
resource.
◆ Clean—See general description on page 5.

State Definitions ONLINE—Indicates that the specified NetBIOS aliases are advertised and
that Samba is handling requests for all specified network interfaces.
Indicates that WINS and Domain support services are running, if
configured.
OFFLINE—Indicates one or more of the following:
◆ NetBIOS name is not advertised.
◆ A NetBIOS alias is not advertised.
◆ Samba is not handling requests on one of the specified interfaces.
◆ If WINS support is configured, Samba is not providing WINS
service.
◆ If domain support is set, Samba is not providing Domain Master
service.
UNKNOWN—Indicates that the agent could not determine the state of the
resource.

50 VERITAS Cluster Server Bundled Agents Reference Guide


Samba Agents

Required Attributes Type and Definition


Dimension

SambaServerRes string-scalar Name of the Samba Server resource.

NetBiosName string-scalar Name by which the Samba server is known in the


network.

Optional Attributes Type and Definition


Dimension

NetBiosAliases string-vector List of additional names by which the Samba


server is known in the network.
For example, host1_samba, myname.

Interfaces string-vector List of network interfaces on which Samba handles


browsing.
For example, 172.29.9.24/16.

WinsSupport integer-scalar If set to 1, this flag causes the agent to configure


Samba as a WINS server.
Default is 0 (No).

DomainMaster integer-scalar If set to 1, this flag causes the agent to set Samba as
Domain Master.
Default is 0 (No).

AgentDebug boolean-scalar If set to 1, this flag causes the agent to log


additional debug messages.
Default is 0 (No).

Chapter 2, Bundled Agents 51


Samba Agents

Type Definition
type NetBios (
static str ArgList[] = { "SambaServerRes:ConfFile",
"SambaServerRes:LockDir", NetBiosName,
NetBiosAliases, Interfaces,
WinsSupport, DomainMaster,
AgentDebug }
NameRule = samba_ + resource.NetBiosName
str SambaServerRes
str NetBiosName
str NetBiosAliases[]
str Interfaces[]
int WinsSupport
int DomainMaster
boolean AgentDebug = 0
)

Sample Configuration

NetBios samba_netbios (
SambaServerRes = samba_server
NetBiosName = sambaX
NetBiosAliases = { samba1, samba2 }
Interfaces = {172.16.7.53/24, 172.16.7.54/255.255.255.0 }
WinsSupport = 0
DomainMaster = 1
)

52 VERITAS Cluster Server Bundled Agents Reference Guide


Samba Agents

SambaServer Agent

Description Starts, stops, and monitors the smbd process as a daemon. Only
one resource of this type is permitted.
The smbd daemon provides Samba share services. The agent
makes a copy of smbd for each client and verifies that Samba is
running by reading the pid of this daemon. The agent can perform
in-depth monitoring by establishing a socket connection to Samba
on port 139 and sending it a NetBIOS session request.

Entry Points ◆ Online—Starts the smbd daemon.


◆ Offline—Stops the smbd daemon.
◆ Monitor—Verifies that the smbd daemon is running by reading
its pid file.
◆ Clean—See general description on page 5.

State Definitions ONLINE—Indicates that the smbd daemon is running. If in-depth


monitoring is configured, it indicates that a positive session
response packet was received through a socket connection to the
Samba server.
OFFLINE—Indicates that smbd is not running. If in-depth
monitoring is enabled, it indicates that the agent could not
establish a socket connection with the server, or that it received an
incorrect response packet header, or the session response packet
connection timed out.
UNKNOWN—Indicates that the agent could not determine the state
of the resource.

Required Attributes Type and Definition


Dimension

ConfFile string-scalar Complete path of the configuration file that


Samba will use.

LockDir string-scalar Lock directory of Samba. Samba stores the files


smbd.pid, nmbd.pid, wins.dat, and
browse.dat in this directory.

Chapter 2, Bundled Agents 53


Samba Agents

Optional Attributes Type and Definition


Dimension

IndepthMonitorCyclePeriod integer-scalar Number of monitor cycles after which the


in-depth monitoring is performed. For
example, the value 5 indicates that the agent
will monitor the resource in-depth every five
monitor cycles. The value 0 or a negative
number indicates that the agent will not
perform in-depth monitoring for the resource.
Default is 5.

ResponseTimeout integer-scalar Number of seconds the agent waits to receive


the session response packet after sending the
session request packet. For example, the value
5 indicates that the agent waits for five seconds
before receiving the session response packet.
Configure this attribute if in-depth monitoring
is enabled.
Default is 10.

AgentDebug boolean-scalar If set to 1, this flag causes the agent to log


additional debug messages.
Default is 0 (No).

Type Definition
type SambaServer (
static str ArgList[] = { ConfFile, LockDir,
IndepthMonitorCyclePeriod,
ResponseTimeout, AgentDebug }
NameRule = SambaServer_ + group.Name
str ConfFile
str LockDir
int IndepthMonitorCyclePeriod = 5
int ResponseTimeout = 10
boolean AgentDebug = 0
)

54 VERITAS Cluster Server Bundled Agents Reference Guide


Samba Agents

Sample Configuration
SambaServer samba_server (
ConFile = "/etc/smb.conf"
LockDir = "/usr/lock/samba"
IndepthMonitorCyclePeriod = 3
ResponseTimeout = 15
)

Chapter 2, Bundled Agents 55


Samba Agents

SambaShare Agent

Description Adds, removes, and monitors a share by modifying the specified Samba
configuration file.
Each filespace or printer service provided by Samba is a shared resource
and is defined as a section in the Samba configuration file. The section
name is the name of the shared resource and the section parameters define
the share attributes.

Entry Points ◆ Online—Edits the samba configuration file and adds the shares.
◆ Offline—Removes the shares from the configuration file.
◆ Monitor—Issues the command smbclient to check if the specified
shares exist.
◆ Clean—See general description on page 5.

State Definitions ONLINE—Indicates that the share is available and that the share path exists.
OFFLINE—Indicates that the share is not available, or that the share has a
non-existent path.
UNKNOWN—Indicates that the agent could not determine the state of the
resource.

Required Attributes Type and Definition


Dimension

SambaServerRes string-scalar Name of the SambaServer resource.

ShareName string-scalar Name of the share resource.


For example, share1.

ShareOptions string-scalar List of parameters for the share attributes. These


parameters are specified as name=value pairs, with
each pair separated by a semicolon (;).
For example, path=/shared; public=yes;
writable=yes.

Optional Attribute Type and Definition


Dimension

AgentDebug boolean-scalar If set to 1, this flag causes the agent to log additional
debug messages.
Default is 0 (No).

56 VERITAS Cluster Server Bundled Agents Reference Guide


Samba Agents

Type Definition
type SambaShare (
static str ArgList[] = { "SambaServerRes:ConfFile",

"SambaServerRes:LockDir", ShareName,
ShareOptions,
AgentDebug }
NameRule = samba_ + resource.ShareName
str SambaServerRes
str ShareName
str ShareOptions
boolean AgentDebug = 0
)

Sample Configuration

SambaShare samba_drive (
SambaServerResName = samba_server
ShareName = share1
ShareOptions = "path=/shared; public=yes; writable = yes"
)

Chapter 2, Bundled Agents 57


Share Agent

Share Agent
Before using this agent:
✔ Verify that the files and directories to be shared are on shared disks.

Description Enables clients to share file system directories from a cluster server.
The directories to be shared are stored on shared disks. The Share agent
ensures transparent access to file system directories during failover. The
agent uses the exportfs command to share and unshare the file system.

Entry Points ◆ Online—Exports (shares) a directory to the specified client.


◆ Offline—Unshares the exported directory from the client.
◆ Monitor—Verifies that the shared directory is exported to the client.
◆ Clean—See general description on page 5.

State Definitions ONLINE—Indicates that specified directory is exported to the client.


OFFLINE—Indicates that the specified directory is not exported to the client.
UNKNOWN—Indicates that the agent could not determine the state of the
resource or that the resource attributes are invalid.

Required Attribute Type and Definition


Dimension

PathName string-scalar Path of the directory to export.


For example, /usr/tom.

Optional Attributes Type and Definition


Dimension

Client string-scalar The new Share agent accepts as many clients as the
user wishes provided all the clients are exported the
same 'PathName'.
Client or host to which the directory specified by
PathName is exported. The client can be a wild card (*)
or a fully qualified domain name (FQDN) including
the host name.
For example, if "outland" is the host name, the FQDN is
outland.veritas.com.

58 VERITAS Cluster Server Bundled Agents Reference Guide


Share Agent

OtherClients string-vector The Client 'Client' attribute can be assigned just one
FQDN hostname, whereas multiple FQDN hostnames
can be assigned to the 'OtherClients' field.
A combination of 'Client' and 'OtherClients' can be
used to specify the hostnames.
If both of the Client and OtherClients attributes are left
unspecified, the PathName will be exported to the
world (*).

Options string-vector Options to the exportfs command. When specifying


multiple options, separate them with commas. For
example, "rw, no_root_squash".
For more information about the exportfs command
and its options, refer to the exportfs manpage.
Default = ro, async, wdelay, root_squash.

AgentDebug boolean-scalar If set to 1, this flag causes the agent to log additional
debug messages.
Default is 0 (No).

Type Definition
type Share (
static str ArgList[] = { PathName, Client, OtherClients, Options,
AgentDebug}
str PathName
str Client
str Options
str OtherClients[]
boolean AgentDebug = 0
)

Sample Configurations
Example 1:
Share resource with one client.
There are two ways to specify a hostname, as a client, in a Share resource:
a. Share myshare (
PathName = "/myshare"
Client = "vcslnx1.veritas.com"
)

Chapter 2, Bundled Agents 59


Share Agent

b. Share myshare (
PathName = "/myshare"
OtherClients = { "vcslnx1.veritas.com" }
)
Example 2: Share resource with multiple clients:

a. Share myshare (
PathName = "/myshare"
Client = "vcslnx2.veritas.com"
OtherClients = { "vcslnx1.veritas.com" }
)

b. Share myshare (
PathName = "/myshare"
OtherClients = { "vcslnx1.veritas.com",
"vcslnx2.veritas.com" }
)

60 VERITAS Cluster Server Bundled Agents Reference Guide


Volume Agent

Volume Agent

Description Brings online, takes offline, and monitors a VERITAS Volume Manager volume.

Entry Points ◆ Online—Starts the volume using the vxrecover command.


◆ Offline—Stops the volume using the vxvol command.
◆ Monitor—Determines if the volume is online or offline by reading a block from the
raw device interface to the volume.
◆ Clean—See general description on page 5.

Required Attributes Type and Definition


Dimension

DiskGroup string-scalar Name of the disk group which contains the volume.
For example, DG1.

Volume string-scalar Name of the volume.


For example, DG1Vol1.

Optional Attribute Type and Definition


Dimension

AgentDebug boolean-scalar If set to 1, this flag causes the agent to log additional debug
messages.
Default is 0 (No).

Type Definition
type Volume (
static int NumThreads = 1
static str ArgList[] = { DiskGroup, Volume, AgentDebug }
NameRule = resource.DiskGroup + "_" + resource.Volume
str DiskGroup
str Volume
boolean AgentDebug = 0
)

Chapter 2, Bundled Agents 61


Volume Agent

Sample Configuration 1
Volume sharedg_vol3 (
Volume = vol3
DiskGroup = sharedg
)

Sample Configuration 2
In this example, the DiskReservation resource is used to verify that disks are available
only to one system. The volumes on the disk groups that are imported are started if the
reservation is confirmed. The volumes can then be mounted at a mount point.

group groupy (
SystemList = { sysA, sysB }
AutoStartList = { sysA }
)

DiskGroup resdg (
DiskGroup = resdg
)

DiskReservation diskres2 (
Disks = { "/dev/sdc", "/dev/sdd", "/dev/sde", "/dev/sdf",
"/dev/sdg" }
ProbeInterval = 5
Percentage = 60
)

Mount mountvol (
BlockDevice = "/dev/vx/dsk/resdg/resvol"
MountPoint = "/share"
FSType = vxfs
MountOpt = rw
)

Volume resdg_resvol (
DiskGroup = resdg
Volume = resvol
)

mountvol requires resdg_resvol


resdg requires diskres2
resdg_resvol requires resdg

62 VERITAS Cluster Server Bundled Agents Reference Guide


Volume Agent

// resource dependency tree


//
//group groupy
//{
//Mount mountvol
// {
// Volume resdg_resvol
// {
// DiskGroup resdg
// {
// DiskReservation diskres2
// }
// }
// }
//}

Chapter 2, Bundled Agents 63


VRTSWebApp Agent

VRTSWebApp Agent

Description Brings Web applications online, takes them offline, and monitors their status. The
application is a Java Web application conforming to the Servlet Specification 2.2 and
runs inside of the Java Web server installed as a part of the VRTSweb package. This
agent is used to monitor VCS Cluster Manager (Web Console) the Web Consoles of
various VERITAS products, such as VCS, GCM, and VVR.

Entry Points Online—Starts the Web application with the specified parameters. If the Web server is
not already running, it will first start the server.
Offline—Removes the Web application from the Web server. If no other Web
application is running, it shuts down the Web server.
Monitor—Checks if the specified Web application is currently running inside the Web
server. If the application is running, monitor reports ONLINE. If the application is not
running, monitor reports OFFLINE.
Clean—Removes the Web application from the Web server. If no other Web application
is running, it shuts down the Web server.

Required Attributes Type and Description


Dimension

AppName string-scalar Name of the application as it appears in the Web server.


For example, for GCM, use “gcm”; for VCS use “vcs.” Access
the applications at: http://hostname:8181/gcm or
http://localhost:8181/vcs.

InstallDir string-scalar Path to the Web application installation. The Web application
must be installed as a .war file with the same name as the
AppName parameter; the "vcs" application must be installed as
vcs.war. This attribute should point to the directory that
contains this .war file.
For example, if AppName is vcs and InstallDir is
/opt/VRTSweb/VERITAS, the agent constructs the path for the
Web application as /opt/VRTSweb/VERITAS/vcs.war.

TimeForOnline integer-scalar The time the Web application takes to start after it is loaded into
the Web server. This parameter is returned as the exit value of
the online script, which inform VCS of the time it needs to wait
before calling monitor on the Web application resource. This
attribute is typically at least five seconds.

64 VERITAS Cluster Server Bundled Agents Reference Guide


VRTSWebApp Agent

Type Definition
type VRTSWebApp (
static str ArgList[] = { AppName, InstallDir,TimeForOnline }
NameRule = VRTSWebApp + "_Web_Application"
str AppName
str InstallDir
int TimeForOnline
static int NumThreads = 1
)

Sample Configuration
VRTSWebApp VCSweb (
AppName = "vcs"
InstallDir = "/opt/VRTSweb/VERITAS"
TimeForOnline = 5
)

Chapter 2, Bundled Agents 65


VRTSWebApp Agent

66 VERITAS Cluster Server Bundled Agents Reference Guide


Optional Bundled Agents (Apache, MySQL) A
This appendix describes optional VCS bundled agents for enterprise-level products. These
agents (Apache Web Server and MySQL) require separate installation processes and
support Apache Web Server 1.3.22 and MySQL 3.22 and 3.23.

Prerequisite for Apache Web Server Agent:


Changing the httpd Directory Structure
Released versions of httpd are available at http://www.apache.org. A typical
installation of Apache Web Server creates the following directories:
◆ /usr/local/apache
◆ /usr/local/apache/bin (location of the httpd binary).
◆ /usr/local/apache/conf (location of the httpd configuration file).
◆ /usr/local/apache/logs (location of the log files and pid file created when
httpd is started).
The Apache Web Server agent assumes /usr/local/apache as the default value for
ServerRoot; however, you must change the value of ServerRoot because httpd installed
with Red Hat distributions creates a different directory structure:
◆ /usr/sbin/httpd
◆ /etc/httpd/conf
◆ /etc/httpd/logs
In this situation, create a directory structure (similar to the one for typical Apache
installations) where the bin, conf, and logs directories are created under ServerRoot
(/etc/httpd).

67
Installing Apache Web Server and MySQL Agents

▼ To change the directory structure for httpd installed with Red Hat distributions

1. Create a bin directory under /etc:


# mkdir /etc/httpd/bin

2. Copy the httpd binary to the new directory:


# cp /usr/sbin/httpd /etc/httpd/bin
or
# cd /etc/httpd/bin
# ln -s /usr/sbin/httpd httpd

3. Change the configuration files (main.cf and vcsApacheTypes.cf) to reflect the


following value for ServerRoot:
ServerRoot = /etc/httpd

Installing Apache Web Server and MySQL Agents


The base VCS installation only installs the standard VCS bundled agents. The Apache
Web Server and MySQL bundled agents have separate rpms for the installation process.
These rpms are bundled on the same VCS CD that contains the base product and install
scripts.
The examples in the following procedure are based on the Apache Web Server agent.
Follow the same procedure to install the MySQL agent using
VRTSvcsMySQL-2.2.rhas21-0.0.i386.rpm and vcsMySqlTypes.cf.

Note The MySQL application must already be installed before installing the MySQL
agent; otherwise, the agent installation will fail.

▼ To install the agent

1. Install the base VCS product.

2. Mount the CD and locate the rpm for the enterprise agent in the enterprise directory.
For example, use VRTSvcsApache-2.2.rhas21-0.0.i386.rpm for the Apache Web Server
agent.

68 VERITAS Cluster Server Bundled Agents Reference Guide


Configuring Apache Web Server and MySQL Agents

3. Install the appropriate rpm:


# rpm -i VRTSvcsApache-2.2.rhas21-0.0.i386.rpm
This command installs the binaries for the Apache Web Server agent in
/opt/VRTSvcs/bin/Apache. The vcsApacheTypes.cf contains the type
definition for the Apache agent and is copied to /etc/VRTSvcs/conf/config.

4. Verify the successful installation of the Apache enterprise agent:


# rpm -qa |grep VRTSvcsApache

5. Repeat steps 2 through step 4 on each system in the cluster.

Configuring Apache Web Server and MySQL Agents


Review the tables in this chapter that describe the enterprise agent’s resource type and
attributes before configuring the agent. Use one of the following methods to configure the
agent:
✔ Use Cluster Manager (Java Console) to add a group template for the agent. Modify
the attribute values of the resources in that group according to your configuration.
✔ Use the types configuration file to directly edit the main.cf file with reference to the
sample main.cf supplied with the agent. The user must stop and restart VCS before
the configuration can take effect.

Configuring Agents with Cluster Manager (Java Console)


The templates for the Apache and MySQL resource groups are automatically installed if
the corresponding agents are installed. Use Cluster Manager (Java Console) to view the
templates which display the Apache or MySQL service group and its resources and
attributes. You can dynamically modify the attribute values according to your
configuration.

Importing the Types.cf File


To use the agent template, import the corresponding types.cf file (for example,
vcsApacheTypes.cf) to the VCS engine through Cluster Manager (Java Console).

Appendix A, Optional Bundled Agents (Apache, MySQL) 69


Configuring Apache Web Server and MySQL Agents

▼ To import the types.cf file

1. Start Cluster Manager (Java Console).

2. Click Import Types on the File menu.

3. On the Import Type dialog box, browse for the appropriate file; for example,
/etc/VRTSvcs/conf/config/vcsApacheTypes.cf.

4. Click Import.

5. Save the configuration.


After the vcsApacheTypes.cf is imported to the VCS engine, the Apache agent can be
configured without interrupting or stopping VCS. Refer to the VERITAS Cluster Server
User’s Guide for more information on Cluster Manager (Java Console).

Configuring Agents with Configuration Files


The Apache Web Server and MySQL bundled agents offer sample configuration files that
can be referred to when modifying your present configuration files. This method requires
that the user restart VCS to implement the configuration.

▼ To configure the agent using the sample configuration file

1. Log on to sysa as root.

2. Create a backup copy of the main.cf file by typing:


# cd /etc/VRTSvcs/conf/config
# cp main.cf main.cf.orig

3. Edit the main.cf file. The file /etc/VRTSvcs/conf/sample_apache/main.cf


or /etc/VRTSvcs/conf/sample_mysql/main.cf can be used for reference
purposes.

a. Add an "include" line for the vcs<EnterpriseAgent>Types.cf file. For example,


include vcsApacheTypes.cf for Apache.

b. Create the resources for the enterprise agent. Refer to the sample configuration
examples in this chapter.

c. Assign dependencies to the newly created resources. Refer to the sample file
/etc/VRTSvcs/conf/sample_apache/main.cf or
/etc/VRTSvcs/conf/sample_mysql/main.cf.

70 VERITAS Cluster Server Bundled Agents Reference Guide


Configuring Apache Web Server and MySQL Agents

4. Save and close the file.

5. Copy the types configuration file for the agent to the proper place.

6. Verify the syntax of the file $VCS_CONF/config/main.cf:


# hacf -verify config

7. Start VCS on sysa:


# hastart

8. Verify that all resources in the agent service group are brought online:
# hagrp -display

9. Take the service group offline and verify that all resources are stopped:
# hagrp -offline service_group -sys system_name
# hagrp -display

10. Bring the service group online again and verify that all resources are available:
# hagrp -online service_group -sys system_name
# hagrp -display

11. Start VCS on sysb:


# hastart

12. Switch the service group to sysb:


# hagrp -switch service_group -to sysb

13. Verify that all service group resources are brought online on sysb:
# hagrp -display

Appendix A, Optional Bundled Agents (Apache, MySQL) 71


Stopping Apache Web Server and MySQL Agents

Stopping Apache Web Server and MySQL Agents


Stopping an agent on a system involves taking the resources of the specific type offline
and removing the type definition of the agent. To take the resources of a specific type
offline on a system, switch the service group to another system or take the group offline
without bringing it online on another system. Stopping an agent on a cluster involves
deleting the resources of the specific type as well as the type itself in the configuration file.
After stopping an agent, you can uninstall it or add it back to the configuration file using
the command line or Cluster Manager (Java Console).

▼ To stop the agent on a system

1. Check if the service group is online:


# hagrp -state service_group -sys system_name

2. If the service group is online, take it offline. Use one of the following commands:

a. To take the service group offline on one system and bring it online on another
system, use the -switch option:
# hagrp -switch service_group -to system_name

b. To take the service group offline without bringing it online elsewhere in the
cluster, type:
# hagrp -offline service_group -sys system_name

3. Stop the agent (for example, Apache) on the system:


# haagent -stop Apache
After stopping the agent, you must remove all references to the agent in the configuration
file for the specific system before you can uninstall it. Refer to “Uninstalling Apache Web
Server and MySQL Agents” on page 74 for more information.

72 VERITAS Cluster Server Bundled Agents Reference Guide


Stopping Apache Web Server and MySQL Agents

▼ To stop the agent on a cluster

Note The following procedure is based on the Apache Web Server agent. Two resources,
myapache1 and myapache2, of type Apache are configured. Follow the same
guidelines to stop the MySQL agent.

1. If the configuration is not in read/write mode, type:


# haconf -makerw

2. To delete the resources of type Apache, type:


# hares -delete myapache1
# hares -delete myapache2

3. To delete the type Apache, type:


# hatype -delete Apache

4. To save the configuration, type:


# haconf -makero
After completing this procedure, you can uninstall the agent. Refer to “Uninstalling
Apache Web Server and MySQL Agents” on page 74 for more information.

Appendix A, Optional Bundled Agents (Apache, MySQL) 73


Uninstalling Apache Web Server and MySQL Agents

Uninstalling Apache Web Server and MySQL Agents


You must stop the agent before you can uninstall it. Refer to “Stopping Apache Web
Server and MySQL Agents” on page 72 for more information. Make sure that all resources
of this type no longer exist in the VCS configuration file, and that this file does not include
the type definition file for the agent.
Uninstalling an agent removes the rpm for the agent. The following procedure is based on
the Apache Web Server agent; follow the same guidelines to uninstall the MySQL agent.

▼ To uninstall the agent

1. Type:
# rpm -e VRTSvcsApache
(This command removes the binaries and the type definition file for the Apache Web
Server agent, and deletes the type definition of the agent in the main.cf.)

2. Repeat this procedure on each system in the cluster.

Note The uninstallvcs script will uninstall bundled agents for enterprise applications
(if any are installed) and the base VCS product.

74 VERITAS Cluster Server Bundled Agents Reference Guide


Apache Web Server Agent

Apache Web Server Agent


Before using this agent:
✔ Verify that the floating IP has the same subnet as that of the cluster systems.
✔ If you use a port other than the default 80, assign an exclusive port for the Apache
server.
✔ Verify that the Apache server configuration files are identical on all cluster systems.
✔ Verify that the Apache httpd executable is in the PATH environment variable.
✔ Verify that the Apache server does not autostart on system startup.
✔ Verify that Inetd does not invoke the Apache server.

Note This agent only supports Apache Web Server 1.3.22.

Description Brings the Apache server online, monitors it, and takes it offline. Reads the
pid file of the httpd process to verify that the Apache server is online.
Monitors the Apache server in detail by connecting to the httpd server on
the given port.
Note The Apache agent depends on the IP agent and requires an IP resource
for operation.

Entry Points ◆ Online—Starts the Apache server by running httpd as a system


command.
◆ Offline—Stops the Apache server by sending a TERM signal to the httpd
server.
◆ Monitor—Verifies that the Apache server is running by reading the pid
file of the parent httpd process.
◆ Clean—Attempts to take the Apache server offline gracefully by sending
a TERM signal to the httpd parent process.

State Definitions ONLINE—Indicates that the Apache server is running.


OFFLINE—Indicates that the Apache server is not running.
UNKNOWN—Indicates that a problem exists with the configuration.

Appendix A, Optional Bundled Agents (Apache, MySQL) 75


Apache Web Server Agent

Required Type and Definition


Attribute Dimension

Address string-scalar An IP address used by the httpd process solely for


Detailed Monitoring. The address must be the same as
the one specified in the configuration file. This attribute
requires the user to configure an IP resource for the
address.

Optional Type and Definition


Attributes Dimension

DetailMonitor boolean-scalar The number of monitor cycles after which the in-depth
monitoring is performed. For example, the value 5
indicates that the agent will monitor the resource
in-depth every five monitor cycles. The value 0, or a
negative value, indicates that the agent will not perform
in-depth monitoring for the resource.
Default is 0.

Port integer-scalar The port for the Apache server used solely for Detailed
Monitoring. This port must be the same as the one
specified in the configuration file. The standard port for
HTTP is 80. Configure this parameter only if the httpd
port is not 80.
Default is 80.

PidFile string-scalar The name of the Apache server process file. If the file
name does not begin with a slash (/), then the agent
assumes it to be a path relative to the ServerRoot.
Default is "logs/httpd.conf".

ServerRoot string-scalar The base directory of the Apache installation. The agent
looks for the Apache server binaries, logs, and
configuration directories relative to ServerRoot.
Default is "/usr/local/httpd".

ConfigFile string-scalar The httpd configuration file that the agent looks for to
execute the startup command. If the attribute value does
not begin with a slash (/), the agent assumes it to be a
path relative to ServerRoot.
Default is "conf/httpd.conf".

76 VERITAS Cluster Server Bundled Agents Reference Guide


Apache Web Server Agent

PreDirective string-association A list of directives that httpd processes before reading


the configuration file. The directives are specified as an
array of name=value combinations, separated by
commas.
For example,
PreDirective{} = {User=nobody,
Group=nobody}

PostDirective string-association A list of directives that httpd processes after reading the
configuration file. The directives are specified as an
array of name=value combinations, separated by
commas.
For example, PostDirective{} = {BindAddress = "*"}

AgentDebug boolean-scalar If set to 1, this flag causes the agent to log additional
debug messages.
Default is 0 (No).

Type Definition
type Apache (
static str ArgList[] = { ServerRoot, DetailMonitor, Port, Address,
PidFile, ConfigFile, Predirective,
Postdirective, AgentDebug }
NameRule = resource.ServerRoot
str ServerRoot = "/usr/local/apache"
int DetailMonitor=0
int Port = 80
str Address
str PidFile = "logs/httpd.pid"
str ConfigFile = "conf/httpd.conf"
str Predirective{}
str Postdirective{}
boolean AgentDebug = 0
)

Appendix A, Optional Bundled Agents (Apache, MySQL) 77


Apache Web Server Agent

Sample Configuration
This example shows how two versions of httpd can run from different locations. In group
Apache_1, httpd runs from Port 80, the default location. The configuration file in
/usr/local/apache/conf/httpd.conf should indicate DocumentRoot, address,
port, and other parameters. In group Apache_2, httpd runs from /home/web/apache.
The PID file for this is created in /home/web/apache/logs/httpd.pid. The
configuration file in /home/web/apache/conf/httpd.conf should define
parameters for running this version of httpd.
Each Apache resource requires an online IP resource. In this example, each Apache
resource requires an online mount resource to mount block devices from disks reserved
by the Disk Reservation agent.

system sysa

system sysb

group Apache_1 (
SystemList = { sysa ,sysb}
AutoStartList = { sysa}
)

Apache Apache./usr/local/apache(
ServerRoot = "/usr/local/apache"
DetailMonitor = 10
PidFile = "logs/httpd.pid"
ConfigFile = "conf/httpd.conf"
Address = "192.168.50.50"

IP myapacheIP(
Device = "eth0"
Address="192.168.50.50"
NetMask="255.255.255.0"

NIC myapacheNIC(
Device="eth0"
NetworkHosts={"172.29.9.178","172.29.9.179"}
)

78 VERITAS Cluster Server Bundled Agents Reference Guide


Apache Web Server Agent

Mount myapacheMnt(
MountPoint="/mnt/apache/"
BlockDevice="/dev/sdd2"

DiskReservation myapacheDiskRes(
Disks ="/dev/sdd"

)
myapacheMnt requires myapacheDiskRes
myapacheIP requires myapacheNIC
myapacheWeb requires myapacheIP
myapacheWeb requires myapacheMnt

group Apache_2 (
SystemList = { sysa,sysb}
AutoStartList = { sysa}
)

Apache myapacheWeb2(
ServerRoot = "/home/web/apache"
DetailMonitor = 10
PidFile = "logs/httpd.pid"
ConfigFile = "conf/httpd.conf"
Address = "192.168.60.50"

IP myapacheIP2(
Device = "eth1"
Address="192.168.60.50"
NetMask="255.255.255.0"

NIC myapacheNIC2(
Device="eth1"
)

Mount myapacheMnt2(
MountPoint="/mnt/apache1/"
BlockDevice="/dev/sdc3"

DiskReservation myapacheDiskRes2(

Appendix A, Optional Bundled Agents (Apache, MySQL) 79


Apache Web Server Agent

Disks ="/dev/sdc"

)
myapacheMnt2 requires myapacheDiskRes2
myapacheIP2 requires myapacheNIC2
myapacheWeb2 requires myapacheIP2
myapacheWeb2 requires myapacheMnt2

80 VERITAS Cluster Server Bundled Agents Reference Guide


MySQL Agent

MySQL Agent

Description Starts, stops, and monitors MySQL daemons. These daemons run the RDBMS MySQL.
Note This agent only supports MySQL 3.22 and 3.23

Entry Points ◆ Online—Starts mysqld from the specified ExecDir. BaseDir, DataDir, IP address,
and port are arguments to start MySQL.
◆ Offline—Stops mysqld by sending a KILL signal.
◆ Monitor—Verifies the existence of MySQL processes. Sends a query to MySQL
server if DetailMonitoring is specified.
◆ Clean—See general description on page 1.

State Definitions ONLINE—Indicates that mysqld is running and responding to queries.


OFFLINE—Indicates that mysqld is not running nor responding to queries.
UNKNOWN—Indicates that the configuration is incorrect or an inability to determine
the status.

Required Attributes Type and Definition


Dimension

ExecDir string-scalar Absolute path to the directory where the mysqld executable
resides.
Default is /usr/libexec.

BaseDir string-scalar Absolute path of the directory where MySQL is installed.


Default is /usr.

DataDir string-scalar Name of the directory, starting with slash (/), where MySQL stores
the data. The directory should reside on shared disk in case VCS
runs on multiple nodes.
Default is /var/lib/mysql.

TCPPort integer-scalar Port number to listen on. This number is different for every
instance of MySQL.
Default is 3306.

User string-scalar User ID under which mysqld will run.


Default is mysq1.

IPResName string-scalar IP resource name which defines the IP address used by MySQL to
communicate with clients.

Appendix A, Optional Bundled Agents (Apache, MySQL) 81


MySQL Agent

Optional Attributes Type and Definition


Dimension

ConfigFile string-scalar Full path of the configuration file, starting with slash (/).

QueryFile string-scalar Name of the query file starting with slash (/). The query in this file
is in the format database:query, which is sent to MySQLd as part of
the Detailed Monitoring.
Default is /var/lib/mysql/query.sql.

MySQLRoot string-scalar Name of the administrator for the MySQL. This is necessary if
InDepthMonitoring takes place.
Default is root.

MySQLRootPassword string-scalar Password for MySQLRoot user. This is the password encrypted
with the encrypt command.

InDepthMonitorCycle integer-scalar Provides the count of normal monitoring before


Period InDepthMonitoring takes place. InDepthMonitoring will occur
only if this value is non-zero and MySQLRoot and Password are
specified.
Default is 5.

AgentDebug boolean-scalar If set to 1, this flag causes the agent to log additional debug
messages.
Default is 0 (No).

82 VERITAS Cluster Server Bundled Agents Reference Guide


MySQL Agent

Type Definition
type MySQL (
static str ArgList[] = { ExecDir, BaseDir, DataDir, TCPPort, User,
ConfFile, QueryFile,
"IPResName:Address", MySQLRoot,
MySQLRootPassword,
InDepthMonitorCyclePeriod, AgentDebug }
NameRule = MySQL_ + resource.TCPPort
str ExecDir = "/usr/libexec"
str BaseDir = "/usr"
str DataDir = "/var/lib/mysql"
int TCPPort = 3306
str User = mysql
str ConfFile
str IPResName
str QueryFile = "/var/lib/mysql/query.sql"
str MySQLRoot = root
str MySQLRootPassword
int InDepthMonitorCyclePeriod = 5
boolean AgentDebug = 0
)

Sample Configuration
In this example, the MySQL resource is configured to perform detailed monitoring every
ten monitor cycles. The query in the QueryFile is executed by the root user with the
encrypted password XYZABC.
IPResName contains the name of the IP resource, which defines the IP address required
by MySQL resource. The disk, which stores the DataDir, needs to be reserved and
mounted. This is indicated by the dependency on the mount_mysql resource.

group MySQL (
SystemList = { sysA = 0, sysB = 1 }
AutoStartList = { sysA }
)

DiskReservation sdg (
Disks = { "/dev/sdg" }
)

IP IP_172_29_9_97 (
Device = eth1
Address = "172.29.9.97"

Appendix A, Optional Bundled Agents (Apache, MySQL) 83


MySQL Agent

NetMask = "255.255.255.0"
)

Mount mount_mysql (
MountPoint = "/mysql"
BlockDevice = "/dev/sdg1"
)

MySQL MySQL_3306 (
ExecDir = "/usr/libexec"
BaseDir = "/usr"
DataDir = "/mysql"
IPResName = IP_172_29_9_97
InDepthMonitorCyclePeriod = 10
QueryFile = "/var/lib/mysql/query.sql"
MySQLRootPassword = "XYZABC"
)

NIC MySQLNIC (
Device = eth0
NetworkHosts = { "172.29.9.143", "172.29.9.144" }
)

IP_172_29_9_97 requires MySQLNIC


MySQL_3306 requires IP_172_29_9_97
MySQL_3306 requires mount_mysql
mount_mysql requires sdg

// resource dependency tree


//
//group MySQL
//{
//MySQL MySQL_3306
// {
// IP IP_172_29_9_97
// {
// NIC MySQLNIC
// }
// Mount mount_mysql
// {
// DiskReservation sdg
// }
// }
//}

84 VERITAS Cluster Server Bundled Agents Reference Guide


Index
A NIC 34
agents NotifierMngr 37
functions 1 Phantom 41
Apache Web Server agent Process 43
configuring 69 Proxy 45
defining ServerRoot 67 SambaServer 53
description of 75 SambaShare 56
installing 68 Share 58
stopping 72 stopping Apache and MySQL agents 72,
uninstalling 74 73
Application agent 6 uninstalling Apache and MySQL
Applications agents 74
managing 6 Volume 61
Attributes VRTSWebApp 64
modifying 2
C
B Cluster Manager (Java Console)
Bundled agents configuring Apache and MySQL
Apache Web Server 75 agents 69
Application 6 modifying attributes 2
categories of 2 Cluster Manager (Web Console)
configuring Apache and MySQL modifying attributes 2
agents 69 Commands
defining 1 hares -modify 37
DiskGroup 10 Configuration files
DiskReservation 13 configuring Apache and MySQL
ElifNone 17 agents 70
FileNone 18 main.cf 2, 42, 74
FileOnOff 19 modifying 2
FileOnOnly 20 types.cf 2
for enterprise applications 1
D
installing Apache and MySQL agents 68
Directories
IP 21
sharing 58
IPMultiNIC 23
Disk groups
Mount 26
managing 10
MultiNICA 28
DiskGroup agent 10
MySQL 81
DiskReservation agent 13
NetBIOS 50
Disks
NFS 32

85
reserving 13 managing 32
NIC
E
configuring 28
ElifNone agent 17
failover 28
Entry points
monitoring 34
defining 5
NIC agent 34
F nmbd
FileNone agent 18 managing 50
FileOnOff agent 19 providing Samba services 48
FileOnOnly agent 20 Notifier process
Files managing 37
managing 19, 20 NotifierMngr agent 37
monitoring 17, 18
O
I operating systems supported 1
IP address
P
base 28
Phantom agent 41
configuring 21, 23
Process agent 43
virtual 21, 23
Proxy agent 45
IP agent 21
IPMultiNIC agent 23 R
Resource types
L
relation to agents 1, 2
Linux OS supported
Resources
Red Hat 1
description of 2
SuSE 1
OnOff 41
VmWare ESX 1
S
M
Samba agents
main.cf 2, 42, 74
configuring 48, 49
Mii
NetBIOS 50
relation to MultiNICA agent 28
SambaServer 53
relation to NIC agent 34
SambaShare 56
Mount agent 26
SambaServer agent 53
Mount points
SambaShare agent 56
managing 26
Share agent 58
mountd
smbd
managing 32
managing 53
MultiNICA agent 28
providing Samba services 48
configuring Proxy resources 28
SMTP servers
MySQL agent
receiving messages 37
configuring 69
SNMP consoles
description of 81
receiving messages 37
installing 68
stopping 72 T
uninstalling 74 types.cf 2
N V
NetBIOS agent 50 Volume agent 61
NFS agent 32 Volume Manager
nfsd managing a disk group 10

86 VERITAS Cluster Server Bundled Agents Reference Guide


managing a volume 61 VRTSWebApp agent 64

Index 87
88 VERITAS Cluster Server Bundled Agents Reference Guide