[SERVER-36693] I have broken MongoDB. Need to repair it soon. Created: 15/Aug/18  Updated: 14/Oct/18  Resolved: 20/Aug/18

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 3.4.4
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Tommy Walfred Assignee: Nick Brewer
Resolution: Done Votes: 0
Labels: envh, rns, rps, trcf, wtc
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 8.1


Attachments: File WiredTiger.turtle     File WiredTiger.turtle     File WiredTiger.turtle     File WiredTiger.turtle     File WiredTiger.wt     File WiredTiger.wt     File WiredTiger.wt     File WiredTiger.wt     File WiredTigerLAS.wt     File repair-attempt.tar.gz     File repair-attempt.tar.gz    
Issue Links:
Related
related to SERVER-37011 Data lost Closed
Operating System: Windows
Participants:

 Description   

Please help me repair my broken MongoDB.

I've attached WiredTiger files.

Thanks in advance!

 



 Comments   
Comment by Tommy Walfred [ 23/Aug/18 ]

Hi Nick,

I could repair my DB with your first provided files. (I had had a backup of broken database.)
But another disaster there!Even though, it's been repaired and I am able to connect it again, I can't see last one month's data.
How can I get back them? Thanks,
Tom 18.08.2018, 02:54, "Nick Brewer (JIRA)" <jira@mongodb.org>:

    [ [1]https://jira.mongodb.org/browse/SERVER-36693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=1979118#comment-1979118 ]

Nick Brewer commented on SERVER-36693:
--------------------------------------

passiondev1 It's unlikely we're going to be able to create a working repair without the files as they existed the last time the mongod successfully booted. For future reference, here's some precautions you can take to avoid issues related to faulty storage layers:

  • Make sure your underlying storage is configured in an optimal way.
  • Schedule and perform regular checks of the integrity of your filesystems and disks.
  • Make sure to update MongoDB to the [most recent version|[3]https://docs.mongodb.com/manual/release-notes/].
  • Never manipulate the underlying database files in any way while mongod is running.
  • Always keep up to date [backups of your databases|[4]https://docs.mongodb.com/manual/core/backups/] and verify that you have a process in place to restore them.
  • Use a [replica set|[5]https://docs.mongodb.com/manual/replication/] for improved reliability.

-Nick
  I have broken MongoDB. Need to repair it soon.
 ----------------------------------------------

                 Key: SERVER-36693
                 URL: [6]https://jira.mongodb.org/browse/SERVER-36693
             Project: Core Server
          Issue Type: Bug
    Affects Versions: 3.4.4
         Environment: Windows 8.1
            Reporter: Tommy Walfred
            Assignee: Nick Brewer
              Labels: envh, rns, trcf, wtc
             Fix For: debugging with submitter

         Attachments: WiredTiger.turtle, WiredTiger.turtle, WiredTiger.turtle, WiredTiger.turtle, WiredTiger.wt, WiredTiger.wt, WiredTiger.wt, WiredTiger.wt, WiredTigerLAS.wt, repair-attempt.tar.gz, repair-attempt.tar.gz

 Please help me repair my broken MongoDB.
 I've attached WiredTiger files.
 Thanks in advance!
  

----------------------
This message was sent from MongoDB's issue tracking system. To respond to this ticket, please login to [7]https://jira.mongodb.org using your JIRA, MongoDB Cloud Manager, or MongoDB Atlas credentials.
----------------------------------------------------------------------------------------
[1] https://jira.mongodb.org/browse/SERVER-36693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=1979118#comment-1979118
[2] https://docs.mongodb.com/manual/administration/production-notes/#disk-and-storage-systems
[3] https://docs.mongodb.com/manual/release-notes/
[4] https://docs.mongodb.com/manual/core/backups/
[5] https://docs.mongodb.com/manual/replication/
[6] https://jira.mongodb.org/browse/SERVER-36693
[7] https://jira.mongodb.org/

Comment by Nick Brewer [ 17/Aug/18 ]

passiondev1 It's unlikely we're going to be able to create a working repair without the files as they existed the last time the mongod successfully booted. For future reference, here's some precautions you can take to avoid issues related to faulty storage layers:

-Nick

Comment by Tommy Walfred [ 16/Aug/18 ]

Unfortunately, I've never backed up the old files.

Comment by Nick Brewer [ 16/Aug/18 ]

If you have the files as they existed after you rebooted your machine, before you replaced them with the old ones, those are the files you should use. Did you make a copy of those files before replacing them?

-Nick

Comment by Tommy Walfred [ 16/Aug/18 ]

So there's no way to repair current db?

Comment by Nick Brewer [ 16/Aug/18 ]

passiondev1 The files shouldn't be modified once they're in a working state. Once the database was working, those were the files you should have continued to use - not the ones that were supplied via the repair attempt.

-Nick

Comment by Tommy Walfred [ 16/Aug/18 ]

Hmm, I can't follow you. These are from same database.
Let me explain again.

I used your first repair attempt files on my broken DB, and it worked.

I disconnected DB, restarted PC, and re-pasted your attempt files on dbpath. And it didn't work.

 

Comment by Nick Brewer [ 16/Aug/18 ]

passiondev1 Can you clarify what you're doing here? Are these files from the same database, or are you trying to use the repaired files on a different database?

-Nick

Comment by Tommy Walfred [ 16/Aug/18 ]

WiredTiger.turtle

Comment by Tommy Walfred [ 16/Aug/18 ]

WiredTiger.wt

Comment by Tommy Walfred [ 16/Aug/18 ]

No, it's not working. I've uploaded current WiredTiger files.

Thanks,

Tom

Comment by Nick Brewer [ 16/Aug/18 ]

passiondev1 I've uploaded a new repair attempt. Please let us know if this works for you.

-Nick

repair-attempt.tar.gz

Comment by Tommy Walfred [ 16/Aug/18 ]

Yeah, I've attached those files.

Comment by Nick Brewer [ 16/Aug/18 ]

passiondev1 It shouldn't be necessary to re-copy and paste the files - did you try booting mongod with the files you placed there before the reboot? If you received an error, could you include it here?

The WiredTigerLAS.wt file isn't necessary for the repair.

-Nick

Comment by Tommy Walfred [ 16/Aug/18 ]

One quick question, Is WiredTigerLAS.wt file not needed for repair? I hadn't attached it at first.

Comment by Tommy Walfred [ 16/Aug/18 ]

I've attached latest wiredTiger files.

Comment by Tommy Walfred [ 16/Aug/18 ]

Hi Nick,

I've tested the attached files.
I've replaced old wiredTiger files with these new ones, and it worked.

After that (restart my PC), and I re-copy & pasted these files to my dbpath. But it's not working now.

Comment by Tommy Walfred [ 16/Aug/18 ]

Hi Nick,
Thanks for your update.
Much appreciated!

I'll try it shortly and let you know.

Tom

Comment by Nick Brewer [ 16/Aug/18 ]

passiondev1 Thanks for the additional information. I've attached the results of a repair attempt - can you please substitute these files for the ones currently in your dbpath, and let us know if this resolves the issue?

Thanks,
Nick

repair-attempt.tar.gz

Comment by Tommy Walfred [ 16/Aug/18 ]

Hi Nick,

Thanks for jumping into repairing my DB.

  • It is running on native hardware. I am not using any container or vm.
  • Sorry, but I am not sure about its cause. It may be unexpected shutdown.

Please let me know if you need anything from me.

Thanks again,

Tom

Comment by Nick Brewer [ 16/Aug/18 ]

passiondev1 Before I proceed with the repair, I'll need to confirm:

  • What environment is mongod running on (container, virtual machine, native hardware, etc)?
  • What was the cause of the crash (unexpected shutdown, disk failure, etc)?

Thanks,
Nick

Generated at Thu Feb 08 04:43:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.