Check which directories are using disk space
1 | sudo du -h --max-depth=1 |
Delete the Mongo Log
1 | sudo rm -rf /var/log/mongodb/mongod.log |
Check which processes have not released the file lock
1 | sudo lsof | egrep "deleted|COMMAND" |
Restart Mongo DB to release the file lock
1 | sudo service mongod restart |
Or run the log rotate command on mongo
1 | db.adminCommand({logRotate:1}) |