phys-schost-1:/ # clresourcegroup create access-rg phys-schost-1:/ # clressharedaddress create -g access-rg sa_host_1 phys-schost-1:/ # clresourcegroup online -eM access-rg phys-schost-1:/ # clresourcegroup create -p Maximum_primaries=2 -p Desired_primaries=2 mgm-rg phys-schost-1:/ # clresourcegroup create -p Maximum_primaries=2 -p Desired_primaries=2 ndbd-rg phys-schost-1:/ # clresourcegroup create -p Maximum_primaries=2 -p Desired_primaries=2 mysql-rg phys-schost-1:/ # clresourcegroup set -p RG_affinities=++ndbd-rg mysql-rg
phys-schost-1:/ # mkdir /cluster-pfiles phys-schost-2:/ # mkdir /cluster-pfiles
phys-schost-1:/ # clresourcetype register gds
Use the content of mysql_ndb_mgmd_config File for the First Node phys-schost-1 for phys-schost-1 and mysql_ndb_mgmd_config File for the Second Node phys-schost-2 for phys-schost-2.
ID=1 for phys-schost-1 ID=2 for phys-schost-2
Value for phys-schost-1:
CONNECT_STRING=phys-schost-1,phys-schost-2
Value for phys-schost-2:
CONNECT_STRING=phys-schost-2,phys-schost-1
phys-schost-1:/ # ksh /opt/SUNWscmys/ndb_mgmd/util/mysql_ndb_mgmd_register \ -f /temp/cluconfig/mysql_ndb_mgmd_config -p phys-schost-2:/ # ksh /opt/SUNWscmys/ndb_mgmd/util/mysql_ndb_mgmd_register \ -f /temp/cluconfig/mysql_ndb_mgmd_config -p
phys-schost-1:/ # ksh /opt/SUNWscmys/ndb_mgmd/util/mysql_ndb_mgmd_register \ -f /temp/cluconfig/mysql_ndb_mgmd_config phys-schost-1:/ # clresourcegroup online -eM mgm-rg phys-schost-1:/ # /usr/local/mysql/bin/ndb_mgm \ --ndb-connectstring=phys-schost-1-p,phys-schost-2-p -e show phys-schost-1:/ # /usr/local/mysql/bin/ndb_mgm \ --ndb-connectstring=phys-schost-2-p,phys-schost-1-p -e show
Use the content of mysql_ndbd_config File for the First Node phys-schost-2 for phys-schost-1 and mysql_ndbd_config File for the Second Node phys-schost-2 for phys-schost-2.
ID=3 for phys-schost-1 ID=4 for phys-schost-2
phys-schost-1:/ # ksh /opt/SUNWscmys/ndbd/util/mysql_ndbd_register \ -f /temp/cluconfig/mysql_ndbd_config -p phys-schost-2:/ # ksh /opt/SUNWscmys/ndbd/util/mysql_ndbd_register \ -f /temp/cluconfig/mysql_ndbd_config -p
phys-schost-1:/ # ksh /opt/SUNWscmys/ndbd/util/mysql_ndbd_register \ -f /temp/cluconfig/mysql_ndbd_config phys-schost-1:/ # clresourcegroup online -eM ndbd-rg
Use the content of ndbd_shutdown_config File for One Node.
phys-schost-1:/ # ksh /opt/SUNWscmys/ndbd_shutdown/util/ndbd_shutdown_register \ -f /temp/cluconfig/ndbd_shutdown_config phys-schost-1:/ # clresourcegroup online -e ndbd-rg
If you want to shut down an ndbd resource on one node only (performing a rolling restart), you can disable it with the clresource disable -n phys-schost-1 ndbd-rs command. In this case, re-enable the ndbd resource before you shut down another resource.
For a rolling restart, do not disable the shutdown controller resource. Doing so would lead to a restart of the ndbd without loading data, in which case your database would be unavailable.
phys-schost-1:/ # ksh /opt/SUNWscmys/util/ha_mysql_register \ -f /temp/cluconfig/ha_mysql_config phys-schost-1:/ # clresourcegroup online -eM mysql-rg