How-To: Check and Increase Size of Translog Database



How to check and increase size of translog database

Note: This does not apply to UCS prior to version UCS 4.3.3 - errata428. In these versions there is no such database “translog”.
Note2: This applies only to 64bit versions of UCS. On 32bit versions the translog uses a Berkeley Database instead, which is only limited by the size of the underlying partition.

Step 1

Verify the current use of the database.

To check if your databases has reached the value.

used_pages=$(mdb_stat -e /var/lib/univention-ldap/translog | sed -n 's/^ *Number of pages used: //p')
max_pages=$(mdb_stat -e /var/lib/univention-ldap/translog | sed -n 's/^ *Max pages: //p')
python -c "print('%.1f used' % (float($used_pages) / $max_pages * 100))"

The last command should output a value between 0 and 100. If this value is close to 100, the database usage is nearly a its limit and you should consider raising the limit.

Step 2

Actually increase the value. Be aware this will increase memory (RAM) usage of the LDAP service.
Note: You will have to increase the value on all UCS server (master, backups, slaves) accordingly to the same value.

Step 2a

Check current size:

root@master:~# ucr get ldap/database/mdb/maxsize

Step 2b

Increase the value as needed (here: 3GB) and restart LDAP service.

root@master:~# ucr get ldap/database/mdb/maxsize=3000000000
systemctl restart slapd