Sample Header Ad - 728x90

mongo2.6 local file size on secondary is much larger than primary

1 vote
1 answer
712 views
I set up a new standalone mongo2.6 and copy one folder(database) from another machine to its data path (because I enabled directoryperdb). Then I set up another machine to make them as a replica set. After rs.initiate and data sync finished, I found the local file size on primary and secondary are: primary: 232G secondary: 316G I found similar question here https://stackoverflow.com/questions/14843229/mongodb-replica-set-disk-size-difference-in-primary-and-secondary-nodes But as the above answer, the primary should use more disk space than the secondary. I need to migrate about 25T data from the old mongo 2.6 cluster. If every database's local file size takes so much more disk space in the secondary, then I need to take this as a spec consideration in the newly bought machine. :(
Asked by CSJ (155 rep)
Feb 6, 2017, 12:49 AM
Last activity: Aug 9, 2025, 05:08 PM