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

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



Hi,

The writing of what the host considers a file (it never mounts the guest file system so, as far as it's concerned, the guest's disk is just a very large file) the writing if it will probably be subject to write caching on the host. I believe the default for writing away the cache it's every 30 seconds.

It could be that there is still unwritten data in the cache. I would try either issuing a sync command before unmounting your volume to force the cache to be written. That might help. Otherwise, I'd put a 60 second sleep after the guest has disappeared from the list before dismounting its volume.

Cheers,
Paul.



Thomas Thrainer <thomasth@xxxxxxxxxx> wrote:
Hi,

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.

Thanks,
Thomas


--
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
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

--
Sent from Kaiten Mail on Android. Please excuse my brevity.
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

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