Run out of space in MongoDB's Host

I was just reading a server crash because the Host Machine / server run out of storage space, this a slice of the log:

E STORAGE [WTCheckpointThread] WiredTiger error (28) [1609930584:117123][11189:0x7fbb8a654700], file:collection-4-8251526658303988689.wt, WT_SESSION.checkpoint: __ckpt_process, 641: collection-4-8251526658303988689.wt: fatal checkpoint failure: No space left on device Raw: 

So the two possibilities are either to extend the storage or to remove data. But since it crashes, neither the server cant be accessed nor mongodump be used.

Would it be a choice to run rsync to make a remote copy of the database? This is, in case the storage can’t be extended.

( This is just out of curiosity, and nothing will be damaged if answer is not strictly correct. )

Hi @santimir,

A variation of your second option would be to free up space elsewhere on the filesystem used by your dbPath.

For example, perhaps there are large log files that could be compressed and/or archived.

Yes, you can use rsync to make a copy of files to another server (see: Back up with cp or rsync in the MongoDB manual).

I would include all directories & files in your current dbPath, and ideally do so while the files are not actively in use by a mongod process (which doesn’t sound like an issue in this situation).

Regards,
Stennie

3 Likes

Just took some time to process the answer. That’s very good!

Thanks for the good explanation. I’ve seen your posts on SO too :joy:

2 Likes

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.