Linux Directory Requiremnts

Hello,

Please let me know best practice Ubuntu/Linux OS directory structure for MongoDB.

Please let me know if I am incorrect for the following:

We need the following LVM as FileSystems in Ubuntu/Linux for MongoDB

StorageDiskPath Size Pupose
/Mongo 50 GB Binaries
/Data 100 GB Data and indexes
/Log 50 GB Mongo logs

Hi @Jitender_Dudhiyani,

Please review our guide for filesystem and linux :

Unfortunately,we cannot recommend on a proper size for your instances as we do not know the data volume/type or the compression rate you will have. We also cannot predict your future growth.

Best regards,
Pavel

Hi @Jitender_Dudhiyani,

Appropriate filesystem sizes will depend on your use case, but I expect the majority of space should be allocated to your dbPath (data and indexes).

The MongoDB binaries add up to a few hundred MB at most, and could be installed on the same filesystem as your O/S or other applications.

Log files depend on your system activity and retention period, but if you rotate and compress old logs 50GB could represent a very generous time period.

As @Pavel_Duchovny suggested, you need to plan according to your use case and expected growth.

Regards,
Stennie

@Pavel_Duchovny, @Stennie_X Thank you for your suggestions. Keeping the size requirements as side, is it a best practice to separate Data & Log? Or, it is okay to place both on the same drive?

Hi @SatyaKrishna,

Separating data and log is not that impacting. However, we do recommend separating journal directoy and the data.

Having said that, you should only do that if the two devices are completely different with parallel write capabilities and your backup method is compatible with this separation.

Best regards,
Pavel

1 Like

Thank you for your feedback

1 Like