[SERVER-4266] Need to support --repairpath outside of --dbpath with journaling on Created: 11/Nov/11 Updated: 06/Dec/22 Resolved: 21/Jun/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Stability, Storage |
| Affects Version/s: | 2.0.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Sridhar Nanjundeswaran | Assignee: | Backlog - Storage Execution Team |
| Resolution: | Done | Votes: | 13 |
| Labels: | needs-prioritization | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
2.0.1 binaries (64 bit) on Windows 7 x64 |
||
| Issue Links: |
|
||||||||||||||||
| Assigned Teams: |
Storage Execution
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Participants: | |||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||
| Description |
|
Start a new database, insert 1 document in it. Now shutdown the database and run mongod --repair --repairpath <>. This immediately crashes with Fri Nov 11 13:28:10 [initandlisten] journal dir=/data/db/journal Fri Nov 11 13:28:11 [initandlisten] build index done 1 records 0.005 secs Note: If you run mongod --repair --repairpath --nojournal this does not occur |
| Comments |
| Comment by Asya Kamsky [ 21/Jun/16 ] |
|
This works without error with 3.2.7 both with WiredTiger and MMAPV1 storage engines. |
| Comment by Ernie Hershey [ 21/Nov/13 ] |
|
We just hit this today working on MCI data. We're using the symlink workaround. Our use case is exactly that - we're running low on space, added a new drive to use for the repair, and can't use it without symlinking into the data directory. |
| Comment by Ian Daniel [ 20/Aug/12 ] |
|
A use case that this bug disallows is when the user is low on disk space and wants to repair, and brings in temporary disk for the repairpath. |
| Comment by Mathias Stearn [ 30/Jan/12 ] |
|
I have reproduced this. It looks like journaling doesn't work well with files outside of --dbpath, which --repairpath is likely to use. A quick-fix would be to disallow --repairpath when using --journaling. A proper fix would likely take a day or two to get right. Edit: to be clear, as a workaround, you can mount (or symlink to) your --repairpath volume in a subdirectory under --dbpath. For example: mongod --dbpath /data/db --repairpath /data/db/_repairPath |