From this guide we know DRBD can used for PostgreSQL Active/Passive setting:
It use /dev/drbd0
to mount PostgreSQL data path /var/lib/psql
:
mount -t ext3 /dev/drbd0 /var/lib/pgsql
So is it possible to use this way to mount a MongoDB data path and where is that path?(Maybe this on CentOS 7.3: /var/lib/mongo
)
If use this way, the multiple nodes will use the synced same file data but not master-slave replication. Maybe this is called master-master replication. Is it good?
Best Answer
Answer is NO, you cannot use it with MongoDB. Result would be corrupted data, sooner or later. MongoDB keeps active data in memory and don't know how to react if data is changed "on-the-fly" at disk.