Go to main content

Oracle® Solaris Cluster Data Service for MySQL Guide

Exit Print View

Updated: June 2017
 
 

How to Enable MySQL to run in an HA Zone Configuration

Before You Begin

Ensure that the /etc/netmasks file has IP-address subnet and netmask entries for all logical hostnames. If necessary, edit the /etc/netmasks file to add any missing entries.

  1. On one of the nodes in the cluster that will host MySQL, become an administrator that provides solaris.cluster.admin authorization.
  2. As the root role, register the SUNW.HAStoragePlus and the SUNW.gds resource types.
    # clresourcetype register SUNW.HAStoragePlus SUNW.gds
  3. Create a failover resource group.
    # clresourcegroup create MySQL-resource-group
  4. Create a resource for the MySQL zone`s disk storage.
    # clresource create -t SUNW.HAStoragePlus \
    -p FileSystemMountPoints=MySQL-instance-mount-points \
    MySQL-has-resource
  5. (Optional) If you want the protection against a total adapter failure for your public network, create a resource for the MySQL`s logical hostname.
    # clreslogicalhostname create -g MySQL-resource-group \
    -h logical-hostname \
    MySQL-logical-hostname-resource-name
  6. Place the resource group in the managed state.
    # clresourcegroup online -M MySQL-resource-group
  7. Install the zones.

    Install the zones according to the Oracle Solaris Cluster HA for Solaris Containers agent documentation, assuming that the resource name is MySQL-zone-rs and that the zone's name is MySQL-zone.

  8. Verify the zone's installation.
    # zoneadm -z MySQL-zone boot
    # zoneadm -z MySQL-zone halt
  9. Register the zone's boot component.
    1. Copy the container resource boot component configuration file.
      # cp /opt/SUNWsczones/sczbt/util/sczbt_config zones-target-configuration-file
    2. In the configuration file, set the following variables:
      RS=MySQL-zone-rs
      RG=MySQL-resource-group
      PARAMETERDIR=MySQL-zone-parameter-directory
      SC_NETWORK=true|false
      SC_LH=MySQL-logical-hostname-resource-name
      FAILOVER=true|false
      HAS_RS=MySQL-has-resource
      Zonename=MySQL-zone
      Zonebootopt=zone-boot-options
      Milestone=zone-boot-milestone
      Mounts=
    3. Create the parameter directory for your zone's resource.
      # mkdir MySQL-zone-parameter-directory
    4. Execute the Oracle Solaris Cluster HA for Solaris Zones registration script.
      # /opt/SUNWsczones/sczbt/util/sczbt_register -f zone's-target-configuration-file
    5. Enable the zone's resource.
      # clresource enable MySQL-zone-rs
  10. Enable the resource group.
    # clresourcegroup online MySQL-resource-group