MongoDB 3.2配置文件directoryPerDB参数,无法重启
2016-07-25 21:49
513 查看
MongoDB3.2 使用过一段时间之后,想要配置下directoryPerDB参数,于是在mongod.conf配置文件storage下加入:
服务重启时报错信息如下:
根据错误日志提示:
初始化失败,当前directoryPerDB选项存储引擎有72个选项冲突,你要求true,但是当前存储服务已经设置为false,并且无法改变,程序终止。
解决办法:
1、删除dbPath文件夹下所有文件,重启MongoDB服务;
2、导出MongoDB 存储文件,删除dbPath文件夹下所有文件,重启MongoDB服务,导入导出的数据;
directoryPerDB: true
服务重启时报错信息如下:
2016-07-21T02:47:14.007-0700 I CONTROL [main] ***** SERVER RESTARTED ***** 2016-07-21T02:47:14.020-0700 I CONTROL [initandlisten] MongoDB starting : pid=2740 port=27017 dbpath=/home/martin/mongodb/db 64-bit host=localhost.localdomain 2016-07-21T02:47:14.020-0700 I CONTROL [initandlisten] db version v3.2.8 2016-07-21T02:47:14.020-0700 I CONTROL [initandlisten] git version: ed70e33130c977bda0024c125b56d159573dbaf0 2016-07-21T02:47:14.020-0700 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013 2016-07-21T02:47:14.020-0700 I CONTROL [initandlisten] allocator: tcmalloc 2016-07-21T02:47:14.020-0700 I CONTROL [initandlisten] modules: enterprise 2016-07-21T02:47:14.020-0700 I CONTROL [initandlisten] build environment: 2016-07-21T02:47:14.020-0700 I CONTROL [initandlisten] distmod: rhel62 2016-07-21T02:47:14.020-0700 I CONTROL [initandlisten] distarch: x86_64 2016-07-21T02:47:14.020-0700 I CONTROL [initandlisten] target_arch: x86_64 2016-07-21T02:47:14.020-0700 I CONTROL [initandlisten] options: { config: "/home/martin/mongodb/bin/mongod.conf", net: { bindIp: "0.0.0.0", port: 27017 }, processManagement: { fork: true, pidFilePath: "/home/martin/mongodb/mongod.pid" }, security: { authorization: "enabled" }, storage: { dbPath: "/home/martin/mongodb/db", directoryPerDB: true, journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, path: "/home/martin/mongodb/logs/mongod.log" } } 2016-07-21T02:47:14.041-0700 I - [initandlisten] Detected data files in /home/martin/mongodb/db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'. 2016-07-21T02:47:14.042-0700 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-07-21T02:47:14.042-0700 I CONTROL [initandlisten] dbexit: rc: 100
根据错误日志提示:
[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
初始化失败,当前directoryPerDB选项存储引擎有72个选项冲突,你要求true,但是当前存储服务已经设置为false,并且无法改变,程序终止。
解决办法:
1、删除dbPath文件夹下所有文件,重启MongoDB服务;
2、导出MongoDB 存储文件,删除dbPath文件夹下所有文件,重启MongoDB服务,导入导出的数据;
相关文章推荐
- mongodb常用指令
- MongoDB的基本指令
- Mongodb的安装
- java的输入输出,操控mongodb
- Mongodb 3节点 Rep set +sharding 配置
- MongoDB单个集合的备份与还原命令
- MongoDB学习笔记—权限管理
- MongoDB数据库操作
- MongoDB启动参数(待翻译)
- MongoDB分片
- mongodb新建用户
- Mongodb 介绍
- mongoDB BI 分析利器 - PostgreSQL FDW (MongoDB Connector for BI)
- ubuntu14安装mongodb
- mongodb的基本操作
- MongoDB安装配置
- MongoDB 创建集合
- MongoDB 创建集合
- MongoDB 创建集合
- nosql之mongodb简单安装与命令使用