0

I have a server running MongoDB on windows server. It was running no problem and then an unexpected shutdown happened. Now, whenever I try starting up mongo it says data directory of C:\data is not found, but I want all data to be written to the E drive. The config file has it being written to the E drive, so I am not sure why it is trying to write to C drive.

I have tried uninstalling and reinstalling but the same problems are occurring, I have a secondary server for failovers and this one is having no problems with the same configs.

original screenshot - text is below

C:\Users\Administrator.M2T>mongod.exe
2023-04-28T11:09:30.091-0500 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --ssiDisabledProtocols "none"
2023-04-28T11:09:30.102-0500 I CONTROL [initandlisten] MongoDB starting: pid-3828 port-27017 dbpath-C:\data\db\ 64-bit host-M2T1DB01
2023-04-28T11:09:30.102-0500 I CONTROL [initandlisten] targetMinOS: Windows 7/Windows Server 2008 R2
2023-04-28T11:09:30.103-0500 I CONTROL [initandlisten] db version v4.2.2
2023-04-28T11:09:30.106-0500 I CONTROL [initandlisten] git version: a0bbbff6ada159e19298d37946ac8dc4b497eadf
2023-04-28T11:09:30.107-0500 I CONTROL [initandlisten] allocator: tcmalloc
2023-04-28T11:09:30.188-0500 I CONTROL [initandlisten] modules: none
2023-04-28T11:09:30.109-0500 I CONTROL [initandlisten] build environment:
2023-04-28T11:09:30.110-0500 I CONTROL [initandlisten]     distmod: 2012plus
2023-04-28T11:09:30.111-0500 I CONTROL [initandlisten]     distarch: x86_64
2023-04-28T11:09:30.111-0500 I CONTROL [initandlisten]     target_arch: x86_64
2023-04-28T11:09:30.112-0500 I CONTROL [initandlisten] options: {}
2023-04-28T11:09:30.114-0500 I STORAGE [initandlisten] exception in initAndListen: NonExistentPath: Data directory C:\data\db\ not found., terminating
2023-04-28T11:09:30.116-0500 I NETWORK [initandlisten] shutdown: going to close listening sockets... [initandlisten] Stopping further Flow Control ticket acquisitions.
2023-04-28T11:09:30.116-0500 I -       [initandlisten] Stopping further Flow Control ticket acquisitions.
2023-04-28T11:09:30.117-0500 I CONTROL [initandlisten] now exiting
2023-04-28T11:09:30.117-0500 I CONTROL [initandlisten] shutting down with code:100
vimuth
  • 5,064
  • 33
  • 79
  • 116
  • Please don't paste screenshots, use formatted text. See https://meta.stackoverflow.com/q/285551 – Wernfried Domscheit Apr 28 '23 at 19:27
  • When you run just `mongod.exe` then it does not load any configuration file (which might be reverted by uninstalling and reinstalling anyway). See https://stackoverflow.com/questions/12738322/what-is-the-default-database-path-for-mongodb/67043090#67043090 – Wernfried Domscheit Apr 28 '23 at 19:28

0 Answers0