Sun Cluster 2.2 API Developer's Guide

Preface

SunTM Cluster 2.2 is a software product that supports specific two to four node server hardware configurations. It is compatible with the SolarisTM 2.6 and Solaris 7 software environments. When configured properly, the hardware and software together provide highly available data services. Sun Cluster depends upon the mirroring, diskset capabilities, and other functionality provided by a volume manager. Sun Cluster supports two volume managers, Solstice DiskSuiteTM and Sun StorEdge Volume ManagerTM (SSVM).

Sun Cluster provides two application programming interfaces (APIs) for making data services highly available. The data services API permits client-server data services to be layered on top of the Sun Cluster software. The fault monitor API enables programmers to develop fault monitors for a new highly available (HA) data service.

Usually, the data service of interest is one that already exists and was developed in a non-HA environment. This API was designed to permit an existing data service to be added easily to the Sun Cluster environment. This manual provides tips on how to achieve the addition.

The Sun Cluster 2.2 API Developer's Guide describes the usage of the two APIs. It discusses conventions that a data service should follow to be highly available.

Chapter 1, Data Services API, includes an example of making a data service highly available. The example data service is the Internet Domain Name Service (DNS), specifically Sun's implementation, which is the daemon program in.named(1M). The in.named example is presented for illustrative purposes only; running the presented code is not supported by Sun.

This manual should be used with the other hardware and software books listed under "Related Documentation", and with the man pages associated with the API. These man pages are: hareg(1M), haget(1M), hads(1M), ha_open(1M), ha_get_calls(1M), hactl(1M), hatimerun(1M), rpc.pmfd(1M), pmfadm(1M), and halockrun(1M). Of particular interest is the Sun Cluster 2.2 System Administration Guide, which describes the cluster environment into which you will integrate your data service.

Who Should Use This Book

This book is intended for programmers responsible for integrating an existing data service application into the HA environment. The instructions and discussions are intended for a technically advanced audience.

The instructions in this book assume the reader has a high level of expertise with the data service being integrated.

How This Book Is Organized

This document contains the following chapters and appendixes:

Chapter 1, Data Services API, introduces the Sun Cluster concepts that enable application programs to become highly available.

Chapter 2, Sample Data Service, describes a sample data service used to demonstrate how the API is used.

Chapter 3, Tips for Writing and Testing HA Data Services, provides suggestions for how to most effectively write and test new data services.

Appendix A, Using Symbolic Links for Multihosted Data Placement, describes how you can use symbolic links to avoid having to modify data service code.

Appendix B, API Man Pages, contains quick reference to the syntax for the commands and functions associated with the Sun Cluster Data Services API, and the complete text of the man pages.

Related Documentation

The documents in Table P-1 contain helpful information for system administrators and service providers.

Table P-1 Related Documentation

Product Family 

Title 

Part Number 

Sun Cluster 

Sun Cluster 2.2 System Administration Guide

805-4238 

 

Sun Cluster 2.2 Software Installation Guide

805-4239 

 

Sun Cluster 2.2 Error Messages Manual

805-4242 

 

Sun Cluster 2.2 Release Notes

805-4243 

Solstice DiskSuite 

Solstice DiskSuite 4.2 Installation/Product Notes

805-5960 

 

Solstice DiskSuite 4.2 User's Guide

805-5961 

 

Solstice DiskSuite 4.2 Reference

805-5962 

SSVM 

Sun StorEdge Volume Manager 2.6 User's Guide

805-5705 

 

Sun StorEdge Volume Manager 2.6 System Administrator's Guide

805-5706 

CVM 

Sun Cluster 2.2 Cluster Volume Manager Guide

805-4240 

Oracle 

Oracle7 Installation Guide for Sun SPARC Solaris 2.x

802-6994 

Name Services 

Name Services Administration Guide

801-6633 

 

Name Services Configuration Guide

801-6635 

Other Manuals 

NFS Administration Guide

801-6634 

 

TCP/IP Network Administration Guide

801-6632 

Typographic Conventions

Table P-2 Typographic Conventions

Typeface or Symbol 

Meaning 

Examples 

AaBbCc123

The names of commands, files, and directories; on-screen computer output. 

 

Edit your .login file.

Use ls -a to list all files.

% You have mail.

AaBbCc123

What you type, when contrasted with on-screen computer output. 

 

% su

Password:

AaBbCc123

Book titles, new words or terms, words to be emphasized. 

Command-line variable; replace with a real name or value. 

Read Chapter 6 in the User's Guide.

These are called class options.

You must be root to do this.

To delete a file, type rm filename.

Shell Prompts

Table P-3 Shell Prompts

Shell 

Prompt 

C shell  

machine_name%

C shell superuser  

machine_name#

Bourne shell and Korn shell  

$

Bourne shell and Korn shell superuser  

#