I am newly starting on mongodb. I know that by default, mongodb pre allocated data files in the order of 64MB, 128MB, 256MB, ....2GB, 2GB, 2GB....etc
Now let us supposed i have a mongo instance that is preallocated with 64MB and 128MB for each of the different collections. Now I would like to know the below
Checking free space in the internal storage files of mongo is not something you normally (or at all) do.
Mongo provides a number of functions which you can use to check the size of collections and some helpful scripts demonstrating how to run the functions on each database on the server.
You can also wrap such functions in a script to make reading easier, such as this script which lists the size and counts for all collections in a database.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With