X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-remote.git/blobdiff_plain/f864eadcc01ce5683683b6b57c25785ace7a848c..refs/heads/prod:/host/usr/sbin/invirt-janitor diff --git a/host/usr/sbin/invirt-janitor b/host/usr/sbin/invirt-janitor index 5d8f4ed..4f79c5b 100755 --- a/host/usr/sbin/invirt-janitor +++ b/host/usr/sbin/invirt-janitor @@ -48,6 +48,12 @@ def cleanup(): if not lv.startswith('old_'): continue + # If the LV doesn't exist, for whatever reason, don't + # proceed because the dd will simply fill the devfs + # by creating a regular file and filling it with zeros. + if not os.path.exists(lv_path): + continue + syslog.syslog(syslog.LOG_INFO, "Cleaning up LV '%s'" % lv_path) # In a perfect world, this should be erroring out with