[CentOS] CentOS 5 Xen Files Left in /var/lib/xen ..

Wed May 9 14:09:12 UTC 2007
Robert Story <rs at centos.spam.futz.org>

On Wed, 09 May 2007 10:13:45 +1000 Graham wrote:
GJ> I have a machine with four guests on it, and it seems to create and
GJ> leave lots of files with names like vmlinuz.LqKA3h and initrd.kolvQu in
GJ> directory /var/lib/xen. The remain there even when all guests are
GJ> gracefully shut down .. and additional ones get created when they are
GJ> next started.
GJ> 
GJ> The end result, of course, is that the root file system fills up. So ..
GJ> how can I prevent this from happening?

I ran into this a few weeks ago too, but had forgotten about it. I just filed
a bug report (http://bugs.centos.org/view.php?id=2027).

GJ> Any ideas?

You could add a cron job:

  find /var/lib/xen  -maxdepth 1 -type f -mtime +1 | \
  egrep "(vmlinuz|initrd)\." | \
  xargs -r /bin/rm -f

This will delete any files older than 24 hours.

-- 
"No sense being pessimistic.  It wouldn't work anyway."
- Phillip Mueller