[SERVER-5400] Repair fails when using --repairpath Created: 26/Mar/12  Updated: 15/Aug/12  Resolved: 17/May/12

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

Type: Question Priority: Major - P3
Reporter: Vinith Philipose Assignee: Mathias Stearn
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File repair.log    
Issue Links:
Depends
Duplicate
duplicates SERVER-5056 Server cannot automatically recover i... Closed
Participants:

 Description   

I am trying to repair the dbPath using the following command line:
/opt/dats/mongodb/latest/bin/mongod --repair --repairpath /export/dsetdata1/hkdatap01 --dbpath /export/dsetdata2/HKDATAT05.daiwaasia.local/mongoData --quota --quotaFiles 100 > repair.log

The repair fails. Attached the repair.log which contain the exception.

How to use repair path correctly so that I can successfully use a directory other than dbPath for the temporary files?



 Comments   
Comment by Vinith Philipose [ 26/Mar/12 ]

Actually I am using repair to free up disk, but since our mongo server instance runs already with journalling on therefore currently we will have to temporarily move the journal folder.

Please let us know which future version gets this issue fixed.

Comment by Eliot Horowitz (Inactive) [ 26/Mar/12 ]

It looks like a bug in the interaction of --repair with --journal.

Note: using the journal while doing a repair is not helpful at all.
The original data files are never written to, and so a journal isn't needed there.
If the repair fails, redoing will be faster than the journal.

So perhaps --repair should just be made not to use the journal at all...

Comment by Vinith Philipose [ 26/Mar/12 ]

It seems after the removal of journal folder it works. Why can't mongod repair handle the journal folder (which can be very useful for repairing.recovery)?

Comment by Eliot Horowitz (Inactive) [ 26/Mar/12 ]

Can you:

start mongod normally.
shut down cleanly

remove journal directory

run --repair with --nojournal

Comment by Vinith Philipose [ 26/Mar/12 ]

Mon Mar 26 11:51:23 [initandlisten] MongoDB starting : pid=6018 port=27017 dbpath=/export/dsetdata2/HKDATAT05.daiwaasia.local/mongoData 64-bit host=HKDATAP01.daiwaasia.local
Mon Mar 26 11:51:23 [initandlisten]
Mon Mar 26 11:51:23 [initandlisten] ** WARNING: You are running on a NUMA machine.
Mon Mar 26 11:51:23 [initandlisten] ** We suggest launching mongod like this to avoid performance problems:
Mon Mar 26 11:51:23 [initandlisten] ** numactl --interleave=all mongod [other options]
Mon Mar 26 11:51:23 [initandlisten]
Mon Mar 26 11:51:23 [initandlisten] db version v2.0.1, pdfile version 4.5
Mon Mar 26 11:51:23 [initandlisten] git version: 3a5cf0e2134a830d38d2d1aae7e88cac31bdd684
Mon Mar 26 11:51:23 [initandlisten] build info: Linux bs-linux64.10gen.cc 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20 17:48:28 EST 2009 x86_64 BOOST_LIB_VERSION=1_41
Mon Mar 26 11:51:23 [initandlisten] options:

{ dbpath: "/export/dsetdata2/HKDATAT05.daiwaasia.local/mongoData", nojournal: true, repair: true, repairpath: "/export/dsetdata1/hkdatap01" }

**************
Error: journal files are present in journal directory, yet starting without --journal enabled.
It is recommended that you start with journaling enabled so that recovery may occur.
**************
Mon Mar 26 11:51:23 [initandlisten] exception in initAndListen: 13597 can't start without --journal enabled when journal/ files are present, terminating
Mon Mar 26 11:51:23 dbexit:
Mon Mar 26 11:51:23 [initandlisten] shutdown: going to close listening sockets...
Mon Mar 26 11:51:23 [initandlisten] shutdown: going to flush diaglog...
Mon Mar 26 11:51:23 [initandlisten] shutdown: going to close sockets...
Mon Mar 26 11:51:23 [initandlisten] shutdown: waiting for fs preallocator...
Mon Mar 26 11:51:23 [initandlisten] shutdown: closing all files...
Mon Mar 26 11:51:23 [initandlisten] closeAllFiles() finished
Mon Mar 26 11:51:23 [initandlisten] shutdown: removing fs lock...
Mon Mar 26 11:51:23 dbexit: really exiting now

Comment by Eliot Horowitz (Inactive) [ 26/Mar/12 ]

Can you try running with --nojournal?

Generated at Thu Feb 08 03:08:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.