I've rs.remove(secondary) from the primary server, now going back to that secondary i want to delete all the data so i can set it up with a other primary, so i've deleted the /var/lib/mongodb, now going back to check if everything is deleted, i can only find local db with
replset.minvalid
replset.oplogTruncateAfterPoint
startup_log
system.rollback.id
so when i db.dropDatabase() i get the following
"operationTime" : Timestamp(0, 0),
"ok" : 0,
"errmsg" : "Cannot drop 'local' database while replication is active",
"code" : 20,
"codeName" : "IllegalOperation",
"$clusterTime" : {
"clusterTime" : Timestamp(0, 0),
"signature" : {
"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
"keyId" : NumberLong(0)
what is wrong ?
Your command line or config file still have the replSet parameter in it, so replication is still active.
Check for lingering replication options in your config file, or the --replSet parameter in the mongod executable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With