I need to migrate a MongoDB replica set from one LAN to another with minimal downtime, I’m looking for a sanity check on my approach and any gotchas to watch out for.
Current setup:
- MongoDB version: 6.0
- 3-member replica set
- Members use hostnames for communication
- No TLS in use
- Both LAN interfaces will be available during migration
Proposed migration steps:
- Configure MongoDB to additionally listen on the new interface
- Change hostname DNS to point to new LAN addresses (and clear out any DNS caches)
- Do a final rolling restart of the replica set
- Decommission old LAN
Is it that straightforward, or am I missing something important? I’ll test first, naturally.