JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Cluster Data Service for PostgreSQL Guide     Oracle Solaris Cluster 4.1
search filter icon
search icon

Document Information

Preface

1.  Installing and Configuring HA for PostgreSQL

A.  Files for Configuring Oracle Solaris Cluster HA for PostgreSQL Resources

B.  Deployment Example: Installing PostgreSQL in the Global Zone or a Zone Cluster

C.  Deployment Example: Installing PostgreSQL in a Non-Global Zone With HA for Solaris Zones

Target Cluster Configuration

Software Configuration

Assumptions

Installing and Configuring PostgreSQL on Shared Storage in a Non-Global Zone with HA for Solaris Zones

Example: Preparing the Cluster for PostgreSQL

Example: Configuring Cluster Resources for PostgreSQL

Example: Configuring HA for Solaris Zones

Example: Modifying the PostgreSQL Configuration File

Example: Building and Installing the PostgreSQL Software on Shared Storage in a Non-Global Zone With HA for Solaris Zones

Example: Enabling the PostgreSQL Software to Run in the Cluster

Installing the PostgreSQL Binaries in the Default Directory in a Non-Global Zone With HA for Solaris Zones (Alternative Installation)

Example: Building and Installing the PostgreSQL Software in the Default Directory in a Non-Global Zone With HA for Solaris Zones

D.  Deployment Example: Installing PostgreSQL in the Global Zone Using WAL File Shipping

Index

Example: Configuring HA for Solaris Zones

  1. On shared cluster storage, create a directory for the HA for Solaris Zones root path.
    phys-schost-1# mkdir /global/mnt3/zones
  2. Create a temporary file, for example /tmp/x, and include the following entries:
    create -b
    set zonepath=/global/mnt3/zones/clu1
    set autoboot=false
    set pool=pool_default
    add net
    set address=hahostix1
    set physical=net1
    end
    add attr
    set name=comment
    set type=string
    set value="PostgreSQL cluster zone" Put your desired zone name between the quotes here.
    end
  3. Configure HA for Solaris Zones, using the file you created.
    phys-schost-1# zonecfg -z clu1 -f /tmp/x
  4. Install the non-global zone.
    phys-schost-1# zoneadm -z clu1 install
  5. Log in to the zone.
    phys-schost-1# zlogin -C clu1
  6. Open a new window to the same node and boot the zone.
    phys-schost-1a# zoneadm -z clu1 boot
  7. Close this terminal window and disconnect from the zone console.
    phys-schost-1# ~~.
  8. Copy the zones configuration file to a temporary location.
    phys-schost-1# cp /opt/SUNWsczone/sczbt/util/sczbt_config /tmp/sczbt_config
  9. Edit the /tmp/sczbt_config file and set variable values as shown:
    RS=RS-PGS-ZONE
    RG=RG-PGS
    PARAMETERDIR=/global/mnt3/zonepar
    SC_NETWORK=false
    SC_LH=
    FAILOVER=true
    HAS_RS=RS-PGS-HAS
    
    Zonename=clu1
    Zonebootopt=
    Milestone=multi-user-server
    Mounts=
  10. Create the zone according to the instructions in the Oracle Solaris Cluster Data Service for Oracle Solaris Zones Guide.
  11. Register the zone resource.
    phys-schost-1# ksh /opt/SUNWsczone/sczbt/util/sczbt_register -f /tmp/sczbt_config
  12. Enable the zone resource.
    phys-schost-1# clresource enable RS-PGS-ZONE