Ignore:
Timestamp:
Aug 11, 2009, 10:38:42 PM (15 years ago)
Author:
broder
Message:

In invirt-remote:

  • Instead of running all of the disk-wiping dds simultaneously, run them sequentially using a janitor daemon (LP: #411486).
Location:
trunk/packages/invirt-remote/host/usr/sbin
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-remote/host/usr/sbin/invirt-lvm

    r2345 r2436  
    6464    ensureoff(machine)
    6565   
    66     # Fork. The child process wipes the LV and then deletes
    67     # it. There's not really anything sane to do with errors (since
    68     # this is running non-interactively), so let's just drop them on
    69     # the floor for now.
    70     if os.fork() == 0:
    71         call(["/usr/bin/ionice", "-c", "2", "-n", "7", "/bin/dd", "if=/dev/zero", "of=%s" % new_lvpath])
    72         call(["/sbin/lvchange", "-a", "n", new_lvpath])
    73         call(["/sbin/lvchange", "-a", "ey", new_lvpath])
    74         call(["/sbin/lvremove", "--force", new_lvpath])
     66    # Touch a file corresponding to the new name of the LV; a separate
     67    # daemon will handle wiping and deleting it.
     68    open(os.path.join('/var/lib/invirt-remote/cleanup', new_lvname), 'w')
    7569elif subcommand == "lvresize":
    7670    size = sys.argv[4]
Note: See TracChangeset for help on using the changeset viewer.