Can I convert a hidden secondary to a standalone mongodb?

Hi,
My first question

Is it possible for a hidden secondary and or delayed member to become a standalone mongo-db ?

Cheers,

Is it converting or using hidden node?
When you say convert do you mean remove other nodes in existing replica?
If it is to use hidden node just include it’s hostname,port in your string to connect to only that node
Please refer to mongo documentation for converting replica to standalone

The replica set" consist of 1 master and 2 secondaries these secondaries are hidden (can never be elected master)

I want to disconnect one of the secondaries from the replica set (leaving a replica set of 1 master and 1 secondary) and use it as a standalone

I just want to verify if this is possible

Cheers,

You need minimum 3 nodes
If you keep only 2 nodes there will not be majority to elect a primary incase one node goes down

Yes, but these 2 secondaries where hidden to begin with, so they could never be a master, would an election still take place?

So are you saying regardless of all the secondaries being hidden you can never have a replica set with only 1 master and 1 secondary?.

But it is possible to disconnect one of the hidden secondaries and turn them into a standalone (generally speaking) keeping the original replicaset in place.

So there is no fault tolerance/failover in your setup?
Why two nodes are hidden?
You should have odd number of nodes like P-S-S or P-S-S
You can have P-S setup but manual intervention needed to force primary incase of failure

Hi ,

Sorry for the misconception, on my part

Basicly the “master” (what i called master) is a replica set by itself

and we want to connect an extra secondary/secondaries, that will never be able to become master (make them hidden secondaries)

The idea is to disconnect one of these hidden secondaries from the replica set and have the data immediately available to us.

There are steps on how to convert replica to standalone on dbastackexchange
Instead of converting entire replica your requirement is to convert just one secondary
Probably same steps apply

You have to stop secondary,remove it from replica from primary,remove replica param and start it as stand alone
You also have to clean replica info from local db