From a691ba4d41d8e82f4bd0b2c16d0f82bd3bea2b59 Mon Sep 17 00:00:00 2001 From: dwight Date: Fri, 18 Mar 2011 03:11:12 -0400 Subject: bad error msg SERVER-2711 --- db/instance.cpp | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'db') diff --git a/db/instance.cpp b/db/instance.cpp index 54fdcf2eac0..37106aabae7 100644 --- a/db/instance.cpp +++ b/db/instance.cpp @@ -915,12 +915,21 @@ namespace mongo { } } else { - errmsg = str::stream() - << "************** \n" - << "old lock file: " << name << ". probably means unclean shutdown\n" - << "recommend removing file and running --repair\n" - << "see: http://dochub.mongodb.org/core/repair for more information\n" - << "*************"; + if (dur::haveJournalFiles()) { + errmsg = str::stream() << "**************\n" + << "Error: journal files are present in journal directory, yet starting without --dur enabled.\n" + << "It is recommended that you start with journaling enabled so that recovery may occur.\n" + << "Alternatively (NOT recommended), you can backup everything, then delete the journal files, and run --repair\n" + << "**************"; + } + else { + errmsg = str::stream() + << "************** \n" + << "old lock file: " << name << ". probably means unclean shutdown\n" + << "recommend removing file and running --repair\n" + << "see: http://dochub.mongodb.org/core/repair for more information\n" + << "*************"; + } } if (!errmsg.empty()) { @@ -940,7 +949,7 @@ namespace mongo { cout << "**************" << endl; cout << "Error: journal files are present in journal directory, yet starting without --dur enabled." << endl; cout << "It is recommended that you start with journaling enabled so that recovery may occur." << endl; - cout << "Alternatively (not recommended), you can backup everything, then delete the journal files, and run --repair" << endl; + cout << "Alternatively (NOT recommended), you can backup everything, then delete the journal files, and run --repair" << endl; cout << "**************" << endl; uasserted(13597, "can't start without --dur enabled when journal/ files are present"); } -- cgit v1.2.1