[SERVER-22073]  Getting : conflicts with current storage engine option for directoryPerDB Created: 06/Jan/16  Updated: 09/Aug/18  Resolved: 06/Jan/16

Status: Closed
Project: Core Server
Component/s: Admin
Affects Version/s: 3.0.4
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: ASHISH FRANCIS Assignee: Kelsey Schubert
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2018-08-08-20-47-39-525.png     PNG File image-2018-08-08-20-50-32-671.png     PNG File image-2018-08-08-20-50-52-053.png    
Participants:

 Description   

I am trying to start mongod but getting below error:

===================================
config file :

systemLog:
   destination: file
   path: "/var/log/mongodb/mongod.log"
   quiet: true
   logAppend: true
storage:
   dbPath: "/data/db"
   directoryPerDB: true
   journal:
      enabled: true
   smallFiles: true
processManagement:
   fork: true
   pidFilePath: "/usr/lib/mongodb/mongod.pid"
net:
   #bindIp: 127.0.0.1
   port: XXXX
   http:
      enabled: false
replication:
 replSetName: "rs1"
 oplogSizeMB: 100
security:
  keyFile: "/usr/lib/mongodb/keyFile/secretKey.key"
  authorization: enabled

When i run I am getting error.

mongod --config /usr/lib/mongodb/conf/rs_member.conf
2016-01-06T04:59:49.227-0600 W CONTROL  Option: storage.smallFiles is deprecated. Please use storage.mmapv1.smallFiles instead.
about to fork child process, waiting until server is ready for connections.
forked process: 27368
ERROR: child process failed, exited with error number 100

Mongod.log says...

2016-01-06T04:59:49.270-0600 I STORAGE  [initandlisten] exception in initAndListen: 72 Requested option conflicts with current storage engine option for directoryPerDB; you requested true but the current server storage is already set to false and cannot be changed, terminating
2016-01-06T04:59:49.270-0600 I CONTROL  [initandlisten] dbexit:  rc: 100
2016-01-06T05:08:22.011-0600 I CONTROL  ***** SERVER RESTARTED *****



 Comments   
Comment by Harshad More [ 09/Aug/18 ]

Thank you abd.dsnt.care@gmail.com . I also got the same error

and I deleted all the contents from DB path and this error gone.

Thank you very much. Appreciated your help.

 

Comment by Ramon Fernandez Marina [ 02/Jul/18 ]

Thanks for sharing your solution abd.dsnt.care@gmail.com. For others watching, note that the solution above is only viable if one doesn't need to preserve their data; if one needs to preserve the data, it can be copied to a new node via db.copyDatabase() or backup and restore for example.

Regards,
Ramón.

Comment by Abd Care [ 26/Jun/18 ]

Hey, I too ran into this issue but was able to figure it out. This issue can be solved by deleting all the contents from the "dbpath" folder and restarting the mongod server. Hope it helped.

Comment by Kelsey Schubert [ 06/Jan/16 ]

Hi afran,

Thanks for your report. Please note that SERVER project is for reporting bugs or feature suggestions for the MongoDB server.

Please consider reviewing our documentation on configuration options, specifically directoryPerDB.

For MongoDB-related support discussion please post on the mongodb-users group or Stack Overflow with the mongodb tag. A question like this involving more discussion would be best posted on the mongodb-users group.

Kind regards,
Thomas

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