cd /var/lib/ldap/
mkdir __db
mv __db.0* __db/
service ldap restart
重启ldap就可以了.

服务器断电重起时就出现LDAP起动不了,
[root@mail log]# service ldap restart
停止 slapd:                                               [失败]
正在检查 slapd 的配置文件: bdb(dc=flashondisk,dc=com): Lock table is out of available locker entries
bdb_db_open: db_open(/var/lib/ldap/flashondisk.com/id2entry.bdb) failed: Cannot allocate memory (12)
bdb(dc=flashondisk,dc=com): Unknown locker ID: a41
bdb(dc=flashondisk,dc=com): Unknown locker ID: 0
backend_startup_one: bi_db_open failed! (12)
slap_startup failed (test would succeed using the -u switch)
                                                           [失败]
/var/lib/ldap/flashondisk.com 中可能存在无效的锁文件       [警告]
[root@mail log]#

maillog日志里提示:
mail postfix/trivial-rewrite[19511]: fatal: proxy:ldap:/etc/postfix/ldap_virtual_alias_maps.cf(0,lock|fold_fix): table lookup problem
May 17 04:05:37 mail postfix/proxymap[17582]: warning: dict_ldap_connect: Unable to bind to server ldap://127.0.0.1:389 as cn=vmail,dc=flashondisk,dc=com: -1 (Can't contact LDAP server)

不知这是什么原因,如何解决以上问题?谢谢!
在网上找了db_recover这个命令在命令行里输入提示没有这个命令没有.