[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-users] When does Xen close instance disks on shutdown?

  • To: xen-users@xxxxxxxxxxxxx
  • From: Thomas Thrainer <thomasth@xxxxxxxxxx>
  • Date: Wed, 8 May 2013 10:24:23 +0200
  • Delivery-date: Wed, 08 May 2013 08:25:44 +0000
  • List-id: Xen user discussion <xen-users.lists.xen.org>


When does Xen exactly close the disks an instance is using after it is shut down? And how is this related to the output of `xm list`?

We (the Ganeti project) believe to experience some timing issues with disks still being used by Xen. Here's essentially what we do:
 * We have a DRBD volume on top of LVM. That's the disk for our VM.
 * To shutdown the VM, we do the following:
  - `xm shutdown <instance>`
  - `xm list`, and check if <instance> is still there
  - repeat until `xm list` no longer shows <instance>
  - de-configure the DRBD volume

The last step fails every now and then, stating that the volume is still in use, presumably because Xen still holds the DRBD volume open. So I was wondering when `xm list` stops to display an instance. Is it removed from the list after the instance is shut down and all resources (including handles) are released by Xen? Or might it be possible that instance disks are still held open, even if `xm list` does no longer show the instance? Is there a more reliable way to find out when Xen does no longer use a disk?

Please note that after a short while the DRBD volume can be de-configured manually, that's what makes me believe that `xm list` is not 100% in sync with Xen's open handles for disks.


Thomas Thrainer | Software Engineer | thomasth@xxxxxxxxxx | 

Google Germany GmbH
Dienerstr. 12
80331 München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Graham Law, Katherine Stephens
Xen-users mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.