How MongoDB allocate new data block when data block is full I am using MongoDB in my project. And I have some questions about how Mongo storage allocated.

For example, I have 16MB full data block, and I want to add new document into this data block. - How MongoDB allocate new data block ? - Will MongoDB move all data or only new document into a new data block ?
Data files are allocated in advance. The following is slightly simplified, for the sake of shortness.

When a MongoDB database is created, an empty datafile with a size of 64 MB is created. As soon as data is written to this pristine data file, a background process creates a new datafile in order to have one ready of the first datafile is full. This will be repeated every time a document is written to a pristine data file. For each new data file, the file size is doubled until the size to allocate reaches 2GB. From that point on, all new datafiles will have 2GB in size.

As for the data, this is a bit more complicated. Put simply, documents are never moved unless it is really necessary, for example if the document grows in size and exceeds its padding space. So if one of your data files is full and a new document is added, only the new document will be written to the new and formerly pristine data file (triggering the allocation of a new data file), and the old documents stay where they were.