Thursday 28 January 2016

Uninstalling MemSQL

Steps:
On Master Aggregator: 
  • memsql-ops memsql-list 
  • memsql-ops memsql-unmonitor (it will ask for node. you have to unmonitor the memsql from all nodes one by one.)
    Select an option: 1 (Example)
  • memsql-ops memsql-list
    No MemSQL nodes were found.
  • memsql-ops uninstall
    WARNING: An unmonitored MemSQL node may still exist on this machine.  It had host 192.168.2.240 and port 3306 the last time MemSQL Ops connected to it.
    We will not be able to uninstall this MemSQL Ops agent until /var/lib/memsql is empty. Make sure that there are no running MemSQL nodes in that directory before deleting anything from it.
     (so go on all nodes one by one and uninstall first there then)
  • memsql-ops agent-uninstall --all
    This will completely delete all MemSQL Ops agents in the cluster, including this one. This operation will delete all MemSQL Ops data in the cluster and cannot be undone.
    If you want to delete all MemSQL Ops agents, please type the word DELETE: DELETE
    WARNING: An unmonitored MemSQL node may still exist on this machine.  It had host 192.168.2.240 and port 3306 the last time MemSQL Ops connected to it.
    Stopping MemSQL Ops
    Waiting up to 60 seconds for a clean exit.
    Done.
    Successfully uninstalled MemSQL Ops
  • netstat -tunlp 
  • kill -9 (pid which occpying memsql port)
  •  
 On Child Aggregator and on Leaves)
  • memsql-ops uninstall
    WARNING: An unmonitored MemSQL node may still exist on this machine.  It had host 192.168.2.249 and port 3307 the last time MemSQL Ops connected to it.
    WARNING: An unmonitored MemSQL node may still exist on this machine.  It had host 192.168.2.249 and port 3306 the last time MemSQL Ops connected to it.
    We will not be able to uninstall this MemSQL Ops agent until /var/lib/memsql is empty. Make sure that there are no running MemSQL nodes in that directory before deleting anything from it.
  •  rm -rf /var/lib/memsql
  • memsql-ops uninstall
    WARNING: An unmonitored MemSQL node may still exist on this machine.  It had host 192.168.2.249 and port 3307 the last time MemSQL Ops connected to it.
    WARNING: An unmonitored MemSQL node may still exist on this machine.  It had host 192.168.2.249 and port 3306 the last time MemSQL Ops connected to it.
    This will completely delete this MemSQL Ops agent along with all of its data
    If you want to delete this MemSQL Ops, please type the word DELETE: DELETE
    Local agent is now a primary.
    Stopping MemSQL Ops
    Waiting up to 60 seconds for a clean exit.
    Done.
    Successfully uninstalled MemSQL Ops
  • netstat -tunlp 
  • kill -9 (pid which occpying memsql port)

Tuesday 12 January 2016

Removing Leaf from cluster


All steps to be performed on Master Aggregator

STEP 1
######
memsql-ops memsql-list

STEP 2
######
memsql-ops agent-list

STEP 3
######
show leaves;

STEP 4
######
show partitions on db1;

STEP 5
######
show partitions extended;

STEP 6
######
memsql-ops memsql-unmonitor 4B4FD60
memsql-ops memsql-unmonitor 73E66DE

STEP 7
######
memsql-ops agent-uninstall --force Aa10a01
memsql-ops agent-uninstall --force A36a36a

STEP 8
######
memsql-ops memsql-list
memsql-ops agent-list


STEP 10
######
REMOVE LEAF '172.27.1.218':3306;
REMOVE LEAF '172.27.3.68':3306;
OR
REMOVE LEAF '172.27.1.218':3306 force;
REMOVE LEAF '172.27.3.68':3306 force ;
REBALANCE PARTITIONS ON db1;

STEP 11
######
SHOW LEAVES;
SHOW AGGREGATORS;
show partitions extended;
SHOW CLUSTER STATUS;