For a complete example of deploying in a failover zone, see Appendix D, Deployment Example: Installing PostgreSQL in a Non-Global Zone.
As superuser register the SUNW.HAStoragePlus and the SUNW.gds resource types.
# clresourcetype register SUNW.HAStoragePlus SUNW.gds |
Create a failover resource group.
# clresourcegroup create PostgreSQL-resource-group |
Create a resource for the PostgreSQL zone`s disk storage.
# clresource create -t SUNW.HAStoragePlus \ -p FileSystemMountPoints=PostgreSQL-instance-mount-points \ PostgreSQL-has-resource |
(Optional) If you want the protection against a total adapter failure for your public network, create a resource for the PostgreSQL`s logical hostname.
# clreslogicalhostname create -g PostgreSQL-resource-group \ PostgreSQL-logical-hostname-resource-name |
Place the resource group in the managed state.
# clresourcegroup online -M PostgreSQL-resource-group |
Install the zone.
Install the zone according to the Sun Cluster HA for Solaris Containers agent documentation, assuming that the resource name is pgsql-zone-rs and that the zone name is pgsql-zone.
Verify the zone's installation.
# zoneadm -z pgsql-zone boot # zoneadm -z pgsql-zone halt |
Register the zone's boot component.
Copy the container resource boot component configuration file.
# cp /opt/SUNWsczone/sczbt/util/sczbt_config zones-target-configuration-file |
Use a plain text editor to set the following variables:
RS=pgsql-zone-rs RG=PostgreSQL-resource-group PARAMETERDIR=pgsql-zone-parameter-directory SC_NETWORK=true|false SC_LH=PostgreSQL-logical-hostname-resource-name FAILOVER=true|false HAS_RS=PostgreSQL-has-resource Zonename=pgsql-zone Zonebootopt=zone-boot-options Milestone=zone-boot-milestone Mounts=
Create the parameter directory for your zone's resource.
# mkdir pgsql-zone-parameter-directory |
Execute the Sun Cluster HA for Solaris Container's registration script.
# /opt/SUNWsczone/sczbt/util/sczbt_register -f zones-target-configuration-file |
Enable the Solaris Container resource
# clresource enable pgsql-zone-rs |
# clresourcegroup online PostgreSQL-resource-group |