我在使用MongoDB磁盘时遇到麻烦。我有一个应用程序,并且在服务器上使用单个MongoDB实例。我也正在处理大数据(例如一个记录存储平均为800MB),并且我正在为此使用GridFS存储。一段时间后,我发现fs.chunks的收集大小为110GB,并删除了所有数据使用mongo shell,但最近1个月除外。
现在fs.chunks集合在“ MongoDB Compass”上似乎为32GB,但是... \ MongoDBDatas \ data文件夹仍为110GB,我的磁盘使用率没有变化。
我该怎么办?
我已经尝试过db.repairDatabase();和紧凑的命令。也重新启动了mongo服务器,但是什么都没有改变。
这是我的mongo.cfg
systemLog:
destination: file
path: d:\HealthcarePlatform\MongoDBDatas\log\mongod.log
storage:
dbPath: d:\HealthcarePlatform\MongoDBDatas\data
net:
port: 28019
bindIp: 0.0.0.0
security:
authorization: enabled
有时我们删除数据库,但是它没有释放空间。所以用这个
sudo lsof +L1