[Date Prev][Date Next]
Re: NFS-shared LMDB?
Quanah Gibson-Mount wrote:
--On Tuesday, July 09, 2013 12:08 PM -0700 Howard Chu <firstname.lastname@example.org> wrote:
Hallvard Breien Furuseth wrote:
Howard Chu writes:
It occurs to me that there is the potential to support an interesting
use case with LMDB when the database resides on remote shared storage.
In the context of slapd, you could run multiple read-only slapds
concurrent with a single read-write slapd on a single database.
Not quite... only slap tools open an MDB (or BDB) environment in
read-only mode, as far as I can tell. slapd always opens read/write.
The "readonly" slapd.conf option only restricts LDAP operations.
We can certainly change this for back-mdb if desired. Add a new config
keyword for this purpose, etc.
Also there's the issue of agreeing who gets to create (and maybe reset?)
a lockfile. IIRC that's where people use mkdir for atomic NFS behavior,
unless modern NFS fixes that. Though maybe it's enough to omit O_CREAT
for the the lockfile in the read-only slapds, if that gets supported.
I would expect the single writing slapd to do all environment
initialization. A reading slapd would require the environment to already
So the downside would be single point of failure for writes? I.e., if the
system with the slapd configured for doing writes went down due to hardware
or power issues, you'd need to configure one of the other slapds to accept
writes, and then update all the clients to use that server.
Yes. We could do this fairly transparently using something like the chaining
overlay. Have it identically configured on all servers, with a prioritized
list of write masters. (Could do this to make mirrormode easier to setup too.)
If the current node is the write master, allow write ops thru, otherwise chain
them to the current write master. Then clients can send ops to any server they
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/