Kprop Eating Disk Space?

Ken Raeburn raeburn at MIT.EDU
Fri Mar 28 19:48:46 EST 2003


Monica Lau <mllau2002 at yahoo.com> writes:
> I have a master kdc and a slave kdc.  In the master kdc, I run a
> script that executes kprop to propagate the database to the slave
> every 2 seconds (for testing purposes).  On the slave kdc, I run the
> "df" command periodically.  I noticed that the disk space percentage
> usage climbs up slowly.  Eventually, it goes up to 100%, and my
> slave machine crashes.  I don't understand how/why kprop could cause
> the disk space in the slave machine to go up because the master
> database is always the same size.  If I stop the propagation, the
> disk space in the slave doesn't go down, until I reboot the machine.

It sounds like unreferenced files being kept around for some reason.
Try looking for old processes hanging around for some reason (is
kpropd not exiting properly?), or get the "lsof" tool and use it to
see what processes might have extra files kept open.

> This is sample output from the "df" command:
>
> Filesystem           1k-blocks      Used Available Use% Mounted on
> /dev/mtdblock3           14976     13436      1540  90% /
>
> This is sample output from the "mount" command:
>
> /dev/mtdblock3 on / type jffs2 (rw)
> /proc on /proc type proc (rw)
> none on /dev/pts type devpts (rw)
> /dev/ram1 on /tmp type ramfs (rw)
> /dev/ram2 on /var type ramfs (rw)

Have you checked for other files growing and shrinking?

Does the space get freed up if you shut down to single-user mode
instead of rebooting?  If it doesn't, what's still running that might
have files open?  If it does, you could try again, killing off a few
processes at a time instead of doing a full shutdown.

> Perhaps, this is a different problem that doesn't have anything to
> do with kprop, but I only see this happening when I run the kprop
> script.  Does anyone have any clues about this strange problem?  I'm
> not familiar with how the kprop process works.  If someone can give
> me a general overview of the process that occurs when the master
> database is propagated to the slave kdc, that would be tremenously
> helpful.  Thanks for your time and help.

Roughly, it goes like this on the slave side:
 - kpropd gets a connection
 - data is saved (default: $localstatedir/krb5kdc/slave_datatrans)
 - kdb5_util is run to create a database from the data in the flat
   file
 - new database is renamed to have the name of the main database
 - kpropd is done, exits
 - kdc closes and re-opens the database

Ken


More information about the Kerberos mailing list