Martin Lang
2008-Oct-20 10:12 UTC
[Xen-users] Shutdown of dom0 with running DomUs cannot deactivate volume group
Hi all, I have a little server with some Debian DomUs that are automatically started at system boot. Each DomU uses LVM Volumes for root and swap area. When I now shutdown the whole machine using the shutdown -h command in the dom0 I always get an error message that LVM cannot be shutdown properly because there are still some active volumes. These are the volumes used by the domUs. When I manually shutdown the domUs using xm shutdown, I do not get the error message. My question now is: is there something similar to the autostart of domUs for shutdown? Do I have to write a special script that calls "xm shutdown -a w"? If yes where do I have to place it. Regards Martin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Todd Deshane
2008-Oct-20 23:59 UTC
Re: [Xen-users] Shutdown of dom0 with running DomUs cannot deactivate volume group
On Mon, Oct 20, 2008 at 6:12 AM, Martin Lang <mlg-hessigheim@gmx.de> wrote:> Hi all, > > I have a little server with some Debian DomUs that are automatically started > at system boot. Each DomU uses LVM Volumes for root and swap area. When I > now shutdown the whole machine using the shutdown -h command in the dom0 I > always get an error message that LVM cannot be shutdown properly because > there are still some active volumes. These are the volumes used by the > domUs. When I manually shutdown the domUs using xm shutdown, I do not get > the error message. > > My question now is: is there something similar to the autostart of domUs for > shutdown? Do I have to write a special script that calls "xm shutdown -a w"? > If yes where do I have to place it. >You should be able to use the domU config option: on_xend_stop cheers, Todd -- Todd Deshane http://todddeshane.net http://runningxen.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Martin Lang
2008-Oct-24 15:05 UTC
Re: [Xen-users] Shutdown of dom0 with running DomUs cannot deactivate volume group
I put on_xend_stop = "shutdown" in my domU config files without any result. I still get the error message that lvm volumes are used and cannot be shutdown. Does setting on_xend_stop = "shutdown" wait until all domUs are shutdown, or does the normal shutdown process go on in parallel. Todd Deshane wrote:> On Mon, Oct 20, 2008 at 6:12 AM, Martin Lang <mlg-hessigheim@gmx.de> wrote: > >> Hi all, >> >> I have a little server with some Debian DomUs that are automatically started >> at system boot. Each DomU uses LVM Volumes for root and swap area. When I >> now shutdown the whole machine using the shutdown -h command in the dom0 I >> always get an error message that LVM cannot be shutdown properly because >> there are still some active volumes. These are the volumes used by the >> domUs. When I manually shutdown the domUs using xm shutdown, I do not get >> the error message. >> >> My question now is: is there something similar to the autostart of domUs for >> shutdown? Do I have to write a special script that calls "xm shutdown -a w"? >> If yes where do I have to place it. >> >> > > You should be able to use the domU config option: > on_xend_stop > > cheers, > Todd > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Todd Deshane
2008-Oct-24 15:26 UTC
Re: [Xen-users] Shutdown of dom0 with running DomUs cannot deactivate volume group
On Fri, Oct 24, 2008 at 11:05 AM, Martin Lang <mlg-hessigheim@gmx.de> wrote:> I put > > on_xend_stop = "shutdown" > > in my domU config files without any result. I still get the error message > that lvm volumes are used and cannot be shutdown. Does setting on_xend_stop > = "shutdown" wait until all domUs are shutdown, or does the normal shutdown > process go on in parallel.You just need to make sure that the xend script is finished before the script that is stopping the LVM volumes. Once you know the lvm script, you could put a while loop in that script that watches for a xend process, and once xend is down, then it should be fine to bring down the LVs. Does that make sense? Cheers, Todd -- Todd Deshane http://todddeshane.net http://runningxen.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Dustin Henning
2008-Oct-24 18:58 UTC
RE: [Xen-users] Shutdown of dom0 with running DomUs cannot deactivate volume group
Doesn''t xenddomains do this during shutdown? I mean, it should wait so long and then forcefully terminate the domain if it won''t shut down. The time to wait prior to kill can be configured, but the forceful termination as part of the xenddomains shutdown, or is xenddomains part of Fedora and not native to xend? Dustin -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Todd Deshane Sent: Friday, October 24, 2008 11:26 To: mlg-hessigheim@gmx.de Cc: xen-users@lists.xensource.com Subject: Re: [Xen-users] Shutdown of dom0 with running DomUs cannot deactivate volume group On Fri, Oct 24, 2008 at 11:05 AM, Martin Lang <mlg-hessigheim@gmx.de> wrote:> I put > > on_xend_stop = "shutdown" > > in my domU config files without any result. I still get the error message > that lvm volumes are used and cannot be shutdown. Does settingon_xend_stop> = "shutdown" wait until all domUs are shutdown, or does the normalshutdown> process go on in parallel.You just need to make sure that the xend script is finished before the script that is stopping the LVM volumes. Once you know the lvm script, you could put a while loop in that script that watches for a xend process, and once xend is down, then it should be fine to bring down the LVs. Does that make sense? Cheers, Todd -- Todd Deshane http://todddeshane.net http://runningxen.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Todd Deshane
2008-Oct-24 19:35 UTC
Re: [Xen-users] Shutdown of dom0 with running DomUs cannot deactivate volume group
On Fri, Oct 24, 2008 at 2:58 PM, Dustin Henning <Dustin.Henning@prd-inc.com> wrote:> Doesn''t xenddomains do this during shutdown? I mean, it should wait > so long and then forcefully terminate the domain if it won''t shut down. The > time to wait prior to kill can be configured, but the forceful termination > as part of the xenddomains shutdown, or is xenddomains part of Fedora and > not native to xend?The xendomains script is actually a good idea here and it comes standard with Xen. The same basic idea should apply, but not tying the guest to xend has a lot of advantages actually. For example when you just want to make a small change and not bring all the guests down. Using the xendomains script should be a better approach. Cheers, Todd _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users