[Community] Node Disk Cleaning Script

Алексей Кайтаз alexey at kaytaz.ru
Thu Aug 2 12:59:42 UTC 2012


Hi!
I hope this script will usefull for somebody.

#!/bin/bash
cd /var/lib/nova/instances
find -name "disk*" | xargs -n1 qemu-img info | grep backing | sed
-e's/.*file: //' -e 's/ .*//' | sort | uniq > /tmp/ignore
while read i; do
ARGS="$ARGS  \( ! -path $i  \) "
done < /tmp/ignore
find /var/lib/nova/instances/_base/ -type f  $ARGS  -delete
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/community/attachments/20120802/f4c695c2/attachment.html>


More information about the Community mailing list