Administration
Removing Unused Space From the Database
Removing Unused Space From the Database
After long and continued use, the principal database on the primary server can grow large due to unused space. When a principal is deleted, the space that the record occupied is not removed. Instead, the space is reserved and marked as "available". Therefore, with extended use, the database can grow very large. Correct the situation by loading all existing principals into a new database. You must perform this process after hours to limit the impact on users.
To create a new database and load existing records:
1.On the primary security server, stop the services and daemons:
•run this command as root a user,
/sbin/init.d/krbsrv stop
2.Make an archive of the principal.* files found on the primary server.
3.Dump the database:
•run this command as a root user,
/opt/krb5/admin/kdb_dump
4.Delete the old database
•run this command,
#rm /opt/krb5/principal*
5.Create a new database, using the same master password and encryption type as when the database was originally created
•run this command,
#/opt/krb5/admin/kdb_create
6.Load the dump file
•run this command,
#/opt/krb5/admin/kdb_load
7.Restart the services and daemons,
•run this command,
204 | Chapter 6 |