Site icon Database Tutorials

Change Data directory and index_path to specific directory path if cluster is built using rolling method

 

Total Time to perform Activity is:  2hr

The following are the high level Steps from DB side:

Step 1:

  1. Disable Auto-Failover
  2. Remove node which doesn’t contain Index .
  3. Rebalance
  4. Stop service
  5. remove old data files
  6. start service
  7. Execute below command

/opt/couchbase/bin/couchbase-cli node-init -c localhost:8091 --node-init-data-path=/couchbase/data -u Administrator -p *******

curl -X POST -u Administrator:****** -d index_path=/couchbase/index http://localhost:8091/nodes/self/controller/settings

 

Step2

a. Create small Index on 10.17.101.225 if present

  1. Add 10.17.101.27 back to cluster
  2. Remove node 10.17.103.90
  3. Swap Rebalance
  4. Stop Service
  5. remove old data files
  6. start service
  7. Execute below command

/opt/couchbase/bin/couchbase-cli node-init -c localhost:8091 --node-init-data-path=/couchbase/data -u Administrator -p *****

curl -X POST -u Administrator:***** -d index_path=/couchbase/index http://localhost:8091/nodes/self/controller/settings

 

Step 3:

  1. Create Index

DROP INDEX <Bucketname>.findAll_operations_index_favorites_active USING GSI;

 

CREATE INDEX findAll_operations_index_watches_active ON <BucketName>(userId,brandId,_class,deleted,updatedTimestamp) WHERE ((_class = "XXXX") and (deleted = false)) USING GSI WITH {"nodes":["10.17.101.27:8091"]};

  1. Add node 10.17.103.90 back to cluster
  2. Remove node 10.17.101.225
  3. Swap Rebalance
  4. Stop Service
  5. remove old data files
  6. start service
  7. Execute below command

/opt/couchbase/bin/couchbase-cli node-init -c localhost:8091 --node-init-data-path=/couchbase/data -u Administrator -p XXXXX

curl -X POST -u Administrator:XXXXXX -d index_path=/couchbase/index http://localhost:8091/nodes/self/controller/settings

  1. Add 10.17.101.225 node back to cluster
  2. Create Small Index

CREATE INDEX findAll_operations_index_favorites_active ON <BucketName>(userId,brandId,_class,deleted,updatedTimestamp) WHERE ((_class = "xxxxxx") and (deleted = false)) USING GSI WITH {"nodes":["10.17.101.225:8091"]};

 

DROP INDEX <BucketName>.findAll_operations_index_favorites_active_1 USING GSI;

Step 4:

Go to settings and

  1. Enable Auto-Failover
  2. Change the Auto compaction settings: 15%.

Exit mobile version