I've seen this question asked a few times but nothing is working for me at the moment. So from the error message which is:
Tue May 31 16:06:09.566 [initandlisten] ERROR: Insufficient free space for journal files
Tue May 31 16:06:09.566 [initandlisten] Please make at least 3379MB available in data/journal or use --smallfiles
My database is called data
so when I run mongod
I need to pass through where my database sits so I run mongod --dbpath data/
i've tried appending --smallfiles
and end up with this:
Tue May 31 16:07:10.268 [FileAllocator] error: failed to allocate new file: data/local.ns size: 16777216 boost::filesystem::create_directory: No space left on device: "data/_tmp". will try again in 10 seconds
I came across this answer Why getting error mongod dead but subsys locked and Insufficient free space for journal files on Linux? which told me to add smallfiles = true
to the mongodb.conf
file which I have and still getting the issue.
Because i'm not sure of how to fix this, i've tried increasing my instance from t2.micro
to m4.large
and i'm still getting the error with not enough space available.
Does anyone have any idea what I can do to fix this?