...
Skip the optional step to cleanup the Nats storage /opt/data/nats if not needed.
Mongodb arbiter config changes done on the mongosh
Main Primary : mongosh (https://www.mongodb.com/docs/manual/tutorial/replace-replica-set-member/ )Code Block mongosh --username opUserRW --password op42flow42 admin --port 27017 rs1 [direct: primary] admin> cfg = rs.conf() rs1 [direct: primary] admin> cfg.members[2].host = "opha-dev6.opmantek.net:27018" rs1 [direct: primary] admin> rs.reconfig(cfg) rs1 [direct: primary] admin> rs.conf()Verify the mongodb cluster config
Code Block mongosh --username opUserRW --password op42flow42 admin --port 27017 rs1 [direct: primary] admin> rs.conf()Code Block members: [ { _id: 0, host: 'opha-dev4.opmantek.net:27017', priority: 2, }, { _id: 1, host: 'opha-dev7.opmantek.net:27017', priority: 1, }, { _id: 2, host: 'opha-dev6.opmantek.net:27018', priority: 0, } ],All vms: (Main Pri, Sec Pri, Pollers, Mirrors)
Edit /usr/local/omk/conf/opCommon.json
...
| Code Block | ||||
|---|---|---|---|---|
| ||||
nats stream list --user omkadmin --password op42opha42 |
Main Primary : mongosh (https://www.mongodb.com/docs/manual/tutorial/replace-replica-set-member/ )
| Code Block | ||||
|---|---|---|---|---|
| ||||
mongosh --username opUserRW --password op42flow42 admin --port 27017
rs1 [direct: primary] admin> cfg = rs.conf()
rs1 [direct: primary] admin> cfg.members[2].host = "opha-dev6.opmantek.net:27018"
rs1 [direct: primary] admin> rs.reconfig(cfg)
rs1 [direct: primary] admin> rs.conf() |
...
| Code Block | ||||
|---|---|---|---|---|
| ||||
members: [
{
_id: 0,
host: 'opha-dev4.opmantek.net:27017',
priority: 2,
},
{
_id: 1,
host: 'opha-dev7.opmantek.net:27017',
priority: 1,
},
{
_id: 2,
host: 'opha-dev6.opmantek.net:27018',
priority: 0,
}
], |
Optional step 3 to cleanup Nats storage /opt/nats/storage
...