Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Created by Joey Ferreira
Created on Sep 4, 2026

Built-in command to relocate oplog / local database to a different filesystem path without node shutdown

What problem are you trying to solve?

Focus on the what and why of the need you have, not the how you'd like it solved.

Moving the oplog (the local database directory) to a different filesystem mount point currently requires a multi-step, per-node procedure: shut down mongod, physically move the directory, create a symlink from the original path, fix ownership, and restart. This must be repeated rolling across every replica set member. The process is operationally expensive, error-prone, and requires a brief per-node outage.

A real-world scenario where this arises: during resharding of a very large collection, the oplog must be temporarily grown from 250 GB to 10 TB (logical). The on-disk footprint requires provisioning a temporary volume. After resharding completes, the oplog is resized back down, compacted, and moved back to the original volume so the temporary storage can be reclaimed. Each direction (out and back) requires the full shutdown/move/symlink/restart cycle on every member, rolling.

What would you like to see happen?

Describe the desired outcome or enhancement.

A built-in server command (e.g., db.adminCommand({ moveLocal: "/new/path" }) or similar) that relocates the local database, including the oplog, to a specified filesystem path while the node remains online, without requiring a shutdown/restart cycle. Comparable to Oracle's ALTER SYSTEM MOVE ARCHIVE LOGS TO "path/dir", which accomplishes the same goal in a single online command.

Why is this important to you or your team?

Explain how the request adds value or solves a business need.

DBAs managing large sharded clusters with multi-terabyte oplog requirements need to temporarily expand and later reclaim oplog storage during resharding operations. The current symlink-based procedure per KB-000019043 works but is cumbersome, requires per-node downtime, and increases operational risk, especially in environments with strict change-control windows. An online command would significantly reduce operational complexity and risk for large-scale maintenance operations.

What steps, if any, are you taking today to manage this problem?

We share KB-000019043 which requires a ton of manual steps / work, in comparison to Oracle which has a single command available to move the path.