Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
breakoutModewide
breakoutWidth760
sudo /usr/local/omk/bin/ophad cmd consumer failover <Poller Cluster ID>

If the target_dir is not /usr/local/omk but different, say /data/omk please suffix the command with the cli option --opha-cli-path /data/omk/bin/opha-cli.pl

Code Block
breakoutModewide
breakoutWidth760
cd /usr/local/omk/bin
sudo /data/omk/bin/ophad cmd consumer failback --opha-cli-path /data/omk/bin/opha-cli.pl <Poller Cluster ID> 

Scenario 3 : Deleting the nats streams (Main Primary)

...

Code Block
breakoutModewide
breakoutWidth760
sudo systemctl restart ophad omkd opeventsd opchartsd​

Scenario 4 : Clearing datastorage of the nats streams (Main Primary)

  1. All vms: (Main Pri, Sec Pri, Pollers, Mirrors)

    Code Block
    sudo systemctl stop ophad
  2. Main Primary: Delete all streams 

    Code Block
    nats stream delete --user omkadmin --password op42opha42

    If jq is installed on Main Primary, this below snippet can be used to automate deletion of all nats streams:

    Code Block
    for stream_name in $(nats stream list --user omkadmin --password op42opha42 --json | jq -r '.[]'); 
          do nats stream rm --force --user omkadmin --password op42opha42 "$stream_name";
    done

    Verify to check if all streams have been deleted

    Code Block
    nats stream info --user omkadmin --password op42opha42
    nats: error: could not pick a Stream to operate on: no Streams are defined
  3. Stop the nats-server on Main Primary, Sec Primary and the Arbiter Poller

    Code Block
    sudo systemctl stop nats-server
  4. Delete the storage directory

    Code Block
    root@opha-dev7:/home/shankarn# cd /opt/nats/storage/
    root@opha-dev7:/opt/nats/storage# ls -lrt
    total 4
    drwx------ 4 root root 4096 Nov 26 11:51 jetstream
    root@opha-dev7:/opt/nats/storage# rm -rf jetstream/
    
  5. Start the nats-server on Main Primary, Sec Primary and the Arbiter Poller

    Code Block
    sudo systemctl start nats-server
  6. All vms (Main Pri, Sec Pri, Pollers, Mirrors) - Restart the services for the changes made to opCommon.json to get reflected.

Code Block
breakoutModewide
breakoutWidth760
sudo systemctl restart ophad omkd opeventsd opchartsd​

...