On the documents under Mongo

  mongodb, question
-rw-------   1 root  wheel    67108864  8 16 13:49 video.0
 -rw-------   1 root  wheel   134217728  8 16 13:48 video.1
 -rw-------   1 root  wheel   268435456  8 16 13:48 video.2
 -rw-------   1 root  wheel   536870912  8 16 13:48 video.3
 -rw-------   1 root  wheel  1073741824  8 16 13:49 video.4
 -rw-------   1 root  wheel  2146435072  8 16 13:49 video.5
 -rw-------   1 root  wheel    16777216  8 16 13:49 video.ns

I feel that video.ns is a process of growth from video.0 to video.5. I feel that the latest data is video.5 can I ask if other data can be deleted? I used rm’s command to delete it before, and then started mongo to report that the data was corrupted. this method is probably problematic. I would like to ask what other methods are available to free up these spaces. . . .

If you calculate it carefully,

video.0 = 64MB
 video.1 = 128MB
 video.2 = 256MB
 video.5 = 2GB

This is the way the MMAPv1 engine allocates space, 2 to the power of n, and will not grow after 2GB.Each file has actual data and cannot be deleted casually.
To tell the truth, why do you think of deleting files directly from the database? It seems that no database supports such an approach. If you want to free up space, a safer way should be considered.Replication Set Resynchronization, orrepairDatabase. The latter has many limitations. Please pay attention to the documents carefully.
In addition, if the data has not been deleted on a large scale, it is not necessary to carry out the above two operations, because there is not much space left anyway.