summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Wlodarek <gregory.wlodarek@mongodb.com>2020-04-24 14:16:31 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-05-01 15:55:49 +0000
commitff5ba2d3b0334580dbfc340ea8552defd7ddfdab (patch)
tree7a002fc37773abb80b0cf32e3579740b8da11ec6
parent31624e095b163379dd95e0c29b44f2a9e412f8fd (diff)
downloadmongo-ff5ba2d3b0334580dbfc340ea8552defd7ddfdab.tar.gz
SERVER-46398 Expand the data directory not found message on startup to be more informative
-rw-r--r--src/mongo/db/storage/storage_engine_lock_file_posix.cpp8
-rw-r--r--src/mongo/db/storage/storage_engine_lock_file_windows.cpp8
2 files changed, 12 insertions, 4 deletions
diff --git a/src/mongo/db/storage/storage_engine_lock_file_posix.cpp b/src/mongo/db/storage/storage_engine_lock_file_posix.cpp
index e08764a4aa9..6eea76425c2 100644
--- a/src/mongo/db/storage/storage_engine_lock_file_posix.cpp
+++ b/src/mongo/db/storage/storage_engine_lock_file_posix.cpp
@@ -130,8 +130,12 @@ bool StorageEngineLockFile::createdByUncleanShutdown() const {
Status StorageEngineLockFile::open() {
try {
if (!boost::filesystem::exists(_dbpath)) {
- return Status(ErrorCodes::NonExistentPath,
- str::stream() << "Data directory " << _dbpath << " not found.");
+ return Status(
+ ErrorCodes::NonExistentPath,
+ str::stream() << "Data directory " << _dbpath
+ << " not found. Create the missing directory or specify another path "
+ "using (1) the --dbpath command line option, or (2) by adding the "
+ "'storage.dbPath' option in the configuration file.");
}
} catch (const std::exception& ex) {
return Status(ErrorCodes::UnknownError,
diff --git a/src/mongo/db/storage/storage_engine_lock_file_windows.cpp b/src/mongo/db/storage/storage_engine_lock_file_windows.cpp
index 97bd280c3fe..690316ebd7a 100644
--- a/src/mongo/db/storage/storage_engine_lock_file_windows.cpp
+++ b/src/mongo/db/storage/storage_engine_lock_file_windows.cpp
@@ -104,8 +104,12 @@ bool StorageEngineLockFile::createdByUncleanShutdown() const {
Status StorageEngineLockFile::open() {
try {
if (!boost::filesystem::exists(_dbpath)) {
- return Status(ErrorCodes::NonExistentPath,
- str::stream() << "Data directory " << _dbpath << " not found.");
+ return Status(
+ ErrorCodes::NonExistentPath,
+ str::stream() << "Data directory " << _dbpath
+ << " not found. Create the missing directory or specify another path "
+ "using (1) the --dbpath command line option, or (2) by adding the "
+ "'storage.dbPath' option in the configuration file.");
}
} catch (const std::exception& ex) {
return Status(ErrorCodes::UnknownError,