How to use the same shared disk/filesystem with boltdb?

636 views Asked by At

I need to share a boltdb database amongt 2 processes (on 2 different linux hosts). One will be alive, the other will be a cold standby that is woken up by pacemaker when the first one is detected as dead.

But problem I'm seeing is that when the cold standby starts, it cannot access the bolt db because of a "no locks available" error.

When the original master recovers, it can successfully open the database.

Does anyone know what is going on or what I'm doing wrong or what I can do to achieve my goal of 2 processes (cold standby woken up for failover) accessing the same boltdb file on a shared disk?

Much appreciated.

1

There are 1 answers

0
the paul On

Copying an answer to the same question on the boltDB Github [https://github.com/boltdb/bolt/issues/690]:

BoltDB doesn't allow multiple processes to access the same database file. It is also not safe to use on network file storage.