Directoryperdb after collection already exist and has data

What happens if I already have collections with data and I enable the directory per db? will mongo move the collection files to the directories?

Why don’t you give it a try and let us know?

it does not: Procedure to do something like this can be found here:
https://docs.mongodb.com/manual/reference/configuration-options/#storage.directoryPerDB

1 Like