A Mac OS X Lion 10.7.5 server running Open Directory hung. SSH was still possible but the sudo reboot command didn't restart the server within 15 minutes. That is why a power cycle was issued. After the power cycle Open Directory would no longer start and the System log is filled with a new message every 10 seconds:
com.apple.launchd[1] (org.openldap.slapd[1153]): Exited with code: 1
com.apple.launchd[1] (org.openldap.slapd): Throttling respawn: Will start in 10 seconds
Repairing disk permission, neither another reboot doesn't solve the issue.
Slapd in Tool mode outputs:
$ sudo /usr/libexec/slapd -Tt
bdb(dc=nl2,dc=probackup,dc=nl): unable to allocate memory for mutex; resize mutex region
bdb_db_open: database "dc=nl2,dc=probackup,dc=nl" cannot be opened, err 12. Restore from backup!
backend_startup_one (type=bdb, suffix="dc=nl2,dc=probackup,dc=nl"): bi_db_open failed! (12)
slap_startup failed (test would succeed using the -u switch)
How to fix this?