I got hacked and my entire production database was deleted. Now when I try to start mongod, I get the error:
Insufficient free space for journal files
Please make at least 3379MB available in /var/lib/mongo/journal or use --smallfiles
Im on an AWS EC2 instance and have lots of space. What can I try?
I checked /etc/mongod.conf and there is a setting there:
storage:
dbPath: /var/lib/mongo
However, from the logs, mongod is looking in /data/db
. When I then create /data/db
I get the error above about insufficient space...
EDIT Ran df -kh /var/lib/mongo which returns
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 7.8G 4.5G 3.3G 58% /
EDIT
Ok i increased space, that helped but now Im getting yet another error:
Failed to unlink socket file /tmp/mongodb-27017.sock errno:1 Operation not permitted
I have tried the solutions here 'Failed to unlink socket file" error in MongoDB 3.0. That is, deleting the file, changing the permissions, but everytime I start mongod, the file reappears and the same error. When I run ls -al on that file I see:
srwx------ 1 mongod mongod 0 Jun 1 18:09 /tmp/mongodb-27017.sock