Divide the mongo data into more than one folder. Possible?

1

I have the mongodb running on a 500GB primary disk. As the base started to grow a lot, I put a 1TB slave disk and changed the data folder to it. I know that over time, this 1TB disc will also be little.

I would like to know if there is a possibility to put a third disk and make the mongo also use it to save data. That is, in my conception mongo would use disks 2 and 3 and divide the data load between them. My question to the connoisseurs is: does this exist? Is it possible?

I have already researched the concept of sharding, and I have already understood it. But in shardind, I would split the data between two machines, that is, between two instances of mongodb. It's an option I have to use in the latter case.

But before starting for sharding, I would still like to know if it is possible in the same instance to split the data between two different folders (which will be on different disks).

I appreciate any information about it.

    
asked by anonymous 12.06.2016 / 22:49

1 answer

0

There are some ways you can do this, if you want to use sharding but do not have a new machine, you can have two or more instances of the mongod running on the same machine, each with a different dbpath. Or you can enable the storage.directoryPerDB option, which will cause each database to have its own subdirectory within the dbpath path and mount the directories pointing to their drives on disk.

More information at: link

    
27.06.2016 / 21:43