-
Type: Bug
-
Resolution: Done
-
Priority: Critical - P2
-
None
-
Affects Version/s: 2.4.7
-
Component/s: Internal Code
-
Environment:Windows 7
-
Windows
-
Luckily I was testing in development environment when this happened but I completely lost 2 databases in the middle of a repair when it crashed with the following error message.
exception in initAndListen: 14043 clear tmp files caught exception exception: boost::filesystem::status: Access is denied: "F:\Temp\mongodb-win32-x86_64-2.4.7-rc0\data_tmp", terminating
Anyway, after some digging, since I just installed the new instance so I can simulate cloning database before doing so in production, I realized that the instance didn't have write permission to that folder so it just quit without creating the new files on repair. I also noticed that database files were actually in tmp* folders but didn't touch them as I wasn't too sure if they were corrupted or not.
What baffled me though is, the instance was able to create _tmp folders but not folders to create databases within the same directory, I would think it will fail completely on everything that needed create permission.
Anyway, by simply giving it all access "everything" permissions to that folder and retrying everything worked as expected.
I'll suggest that this is documented or at least the internal code should run a quick test before starting the repair process and failing later. I'm sure someone is going to try it in production before testing and blow out databases as I almost did.
As always, love MongoDB, thanks team MongoDB.