We have 3 members replica set of mongo db (MongoDB server version: 4.2.9). one of the member (secondary) is running on default storage db path and this storage getting nearly full. We need to change path of that specific secondary node of 3-member replica set. I am new with mongodb. I need your expertise with mongo to share with to accomplish this task.
MongoDB server version: 4.2.9 OS Version: CentOS Linux release 7.8.2003 (Core).
Hi, for your reference, you may consider the following option:
For safety, create a fresh new secondary node with the new dbpath in your new mongod.conf file. The new dbpath must be empty but it’s fine since the new secondary node will pull data from the primary node for inital resync.
After the new secondary node is in sync with the primary, retire that old secondary and remove its config from the primary.