Our test setup uses LVM logical volumes as backend devices for the domUs. For example, the configuration file for the first domU says: disk = [''phy:/dev/virt-blkdev-backend/dom1,sda1,w'', ''phy:/dev/virt-blkdev-backend/usr,sda2,r''] The configuration files for the domUs also have: on_poweroff = ''destroy'' on_reboot = ''destroy'' on_crash = ''destroy'' The testing framework typically destroys and recreates the LVM volumes for the domUs for a run of tests. However, when the system hangs (domU down, dom0 down, network down, can reboot from Xen console, but that''s another problem) and the system is rebooted, I cannot destroy the LVM volumes because they are in use. No domUs are started after the reboot. What is holding onto the LVM volumes? Is there a way to get them released? Am I missing something? Or is this a bug? Thanks for any help. Steve D. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> However, when the system hangs (domU down, dom0 down, network down, can > reboot from Xen console, but that''s another problem) and the system is > rebooted, I cannot destroy the LVM volumes because they are in use. No > domUs are started after the reboot. > > What is holding onto the LVM volumes? Is there a way to get them released? > Am I missing something? Or is this a bug? > > Thanks for any help. > > Steve D.I actually saw this too. The domains that by xendomains (that have config file in /etc/xen/auto at boot when xendomains started) will be shutdown (gracefully as appose to poweroff/destroy) during domain-0 shutdown, and will come up normally when server rebooted. However if I add a new config file to /etc/xen/auto and xm create a new domain, this domain will not be shutdown by xendomains during server shutdown, and when server come back it has trouble start this domain because it device in use( will shown can not connect to device in xend.log). Do a xm list showing this domain in r or p state. I have to xm destroy it before I can xm create it again. I say it''s bug and should be fixed. xendomains should shutdown all running domainU instead of just ones it started. Wensheng Wang _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Thu, 10 Nov 2005, Wensheng Wang wrote:> > However, when the system hangs (domU down, dom0 down, network down, can > > reboot from Xen console, but that''s another problem) and the system is > > rebooted, I cannot destroy the LVM volumes because they are in use. No > > domUs are started after the reboot. > > > > What is holding onto the LVM volumes? Is there a way to get them released? > > Am I missing something? Or is this a bug? > > > > Thanks for any help. > > > > Steve D. > > I actually saw this too. > The domains that by xendomains (that have config file in /etc/xen/auto > at boot when xendomains started) will be shutdown (gracefully as > appose to poweroff/destroy) during domain-0 shutdown, and will come up > normally when server rebooted. > > However if I add a new config file to /etc/xen/auto and xm create a > new domain, this domain will not be shutdown by xendomains during > server shutdown, and when server come back it has trouble start this > domain because it device in use( will shown can not connect to device > in xend.log). Do a xm list showing this domain in r or p state. I > have to xm destroy it before I can xm create it again. > > I say it''s bug and should be fixed. xendomains should shutdown all > running domainU instead of just ones it started.The better fix is to have xm learn about /etc/xen/auto, and get rid of the xendomains init script. xm create -a _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> > I actually saw this too. > > The domains that by xendomains (that have config file in /etc/xen/auto > > at boot when xendomains started) will be shutdown (gracefully as > > appose to poweroff/destroy) during domain-0 shutdown, and will come up > > normally when server rebooted. > > > > However if I add a new config file to /etc/xen/auto and xm create a > > new domain, this domain will not be shutdown by xendomains during > > server shutdown, and when server come back it has trouble start this > > domain because it device in use( will shown can not connect to device > > in xend.log). Do a xm list showing this domain in r or p state. I > > have to xm destroy it before I can xm create it again. > > > > I say it''s bug and should be fixed. xendomains should shutdown all > > running domainU instead of just ones it started.OK, I jumped into this thread a bit late but here goes. 1) I''m not sure why the device should still be in use after reboot 2) xendomains used to allow all running domains to be shutdown, not just the ones in /etc/xen/auto - this might have become configurable with the recent enhancements, did you check for this?> The better fix is to have xm learn about /etc/xen/auto, and get rid of the > xendomains init script. > > xm create -aI''m not clear what the advantage in having the looping code within xm, rather than within the init script? Cheers, Mark _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
I just looked at my /etc/init.d/xendomains, in stop(), it test a env variable called XENDOMAINS_AUTO_ONLY, If it true, it shutdown only those in /etc/xen/auto And in my /etc/sysconfig/xendomains, this variable is indeed set false. Then it try to "xm save" followed by "xm shutdown" if "xm save" failed. In my /etc/sysocnfig/xendomains, XENDOMAINS_SAVE is set to /var/lib/xen/save, But I don''t have this directory. So it should proceed to shutting-down. It all look good to me. I don''t understand why I had this problem. I will try reboot again and see what happens. I only saw it once. Wensheng Wang ---------------------------------- On 11/11/05, Mark Williamson <mark.williamson@cl.cam.ac.uk> wrote:> > > I actually saw this too. > > > The domains that by xendomains (that have config file in /etc/xen/auto > > > at boot when xendomains started) will be shutdown (gracefully as > > > appose to poweroff/destroy) during domain-0 shutdown, and will come up > > > normally when server rebooted. > > > > > > However if I add a new config file to /etc/xen/auto and xm create a > > > new domain, this domain will not be shutdown by xendomains during > > > server shutdown, and when server come back it has trouble start this > > > domain because it device in use( will shown can not connect to device > > > in xend.log). Do a xm list showing this domain in r or p state. I > > > have to xm destroy it before I can xm create it again. > > > > > > I say it''s bug and should be fixed. xendomains should shutdown all > > > running domainU instead of just ones it started. > > OK, I jumped into this thread a bit late but here goes. > > 1) I''m not sure why the device should still be in use after reboot > 2) xendomains used to allow all running domains to be shutdown, not just the > ones in /etc/xen/auto - this might have become configurable with the recent > enhancements, did you check for this? > > > The better fix is to have xm learn about /etc/xen/auto, and get rid of the > > xendomains init script. > > > > xm create -a > > I''m not clear what the advantage in having the looping code within xm, rather > than within the init script? > > Cheers, > Mark >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Fri, 11 Nov 2005, Mark Williamson wrote:> > > I actually saw this too. > > > The domains that by xendomains (that have config file in /etc/xen/auto > > > at boot when xendomains started) will be shutdown (gracefully as > > > appose to poweroff/destroy) during domain-0 shutdown, and will come up > > > normally when server rebooted. > > > > > > However if I add a new config file to /etc/xen/auto and xm create a > > > new domain, this domain will not be shutdown by xendomains during > > > server shutdown, and when server come back it has trouble start this > > > domain because it device in use( will shown can not connect to device > > > in xend.log). Do a xm list showing this domain in r or p state. I > > > have to xm destroy it before I can xm create it again. > > > > > > I say it''s bug and should be fixed. xendomains should shutdown all > > > running domainU instead of just ones it started. > > OK, I jumped into this thread a bit late but here goes. > > 1) I''m not sure why the device should still be in use after reboot > 2) xendomains used to allow all running domains to be shutdown, not just the > ones in /etc/xen/auto - this might have become configurable with the recent > enhancements, did you check for this? > > > The better fix is to have xm learn about /etc/xen/auto, and get rid of the > > xendomains init script. > > > > xm create -a > > I''m not clear what the advantage in having the looping code within xm, rather > than within the init script?xm create foodomain This would create the state files saying foodomain is active. xm shutdown -a This would handle all domains started with xm create -a, and started individually. It also would mean one command to do everything, instead of several. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> > I''m not clear what the advantage in having the looping code within xm, > > rather than within the init script? > > xm create foodomain > > This would create the state files saying foodomain is active. > > xm shutdown -a > > This would handle all domains started with xm create -a, and started > individually. > > It also would mean one command to do everything, instead of several.Actually, we have a shutdown -a that will destroy all active domains. We also have a -w option to cause it to do so synchronously. When I wrote the original xendomains script ages ago, this was just an easier way to do things than have the init script figure out shutdowns. It seems to have persisted into the current generation of tools! The create path is much simpler, though; xendomains just loops over everything in the /etc/xen/auto directory and kicks it into life with a "create" call. I guess it''s more uniform to have it in xm but I quite liked separating it out from the core tools. Just $0.02, Mark _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel